Could somebody please provide an example of returning clause for update,
delete or insert SQL statement when there is an update, delete or insert of
multiple rows. I know how to do it if there is one row.
Alex Hillman
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
How about:
DECLARE
TYPE NumList IS TABLE OF emp.empno%TYPE;
enums NumList;
BEGIN
DELETE FROM emp WHERE deptno = 20
RETURNING empno BULK COLLECT INTO enums;
-- if there were five employees in department 20,
-- then enums contains five employee numbers
END;
Jared
On