Is it possible to somehow log what a SQL-statement results in. For example:
INSERT INTO bonus SELECT ename, job, sal, comm FROM emp
WHERE comm > sal * 0.25;
How to get which rows that are acually inserted (or updated or deleted if it’s another query), instead of just getting “5 rows inserted.”. It would be especially nice if it’s possible to get the change in SQL-form.
This works in SQL Server, but I’m afraid I don’t know of an Oracle equivalent. (Not what you’re looking for, I know, but it might get you closer…)
All I know of in Oracle is the sql%rowcount variable: Number of rows affected by an UPDATE in PL/SQL
EDIT
Oracle does have an equivalent, the RETURNING clause: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/returninginto_clause.htm