Is there an equivalent to SQL%ROWCOUNT usable outside of PL/SQL?
536605Apr 19 2007 — edited Apr 20 2007Is there a way to know the number of rows a previous SQL statement affected, outside of using PL/SQL. Example:
UPDATE TABLE1
SET COLUMN1 = 'X'
WHERE COLUMN1 <> 'X';
INSERT INTO TABLE1_LOG_HISTORY
( MESSAGE_COLUMN, DATE_TIME )
VALUES ('Table activity, rows were updated', SYSDATE)
WHERE sql%rowcount {or equivalent function} > 0;
I'm aware this can be done inside an anonymous procedure, but do not want to do it that way.