Agree completely.
In fact, Thomas Kyte, the Oracle (specifically SQL) Guru keeps saying the same thing. One of the best examples that he gives for this is as follows:
A common requirement is update a record in table if it already exists, otherwise add a new record.
Logic as used by many:
SELECT COUNT(*)
INTO l_ctr
FROM MY_TABLE
WHERE key column = key column value;
If l_ctr = 0 THEN
INSERT INTO MY_TABLE (column list)
values (values);
Else
UPDATE MY_TABLE
SET columns = values
WHERE key column = key column value ;
End If;
Ideally, what should be used is a MERGE statement (in Oracle 9i and above and if using data from other table) orfollowing (in oracle 8i and below):
=================================================
UPDATE MY_TABLE
SET columns = values
WHERE key column = key column value ;
IF SQL%ROWCOUNT = 0 THEN
INSERT INTO MY_TABLE (column list)
values (values);
That SELECT is completely unnecessary.