example of using clause RETURNING

2001-05-21 Thread Hillman, Alex
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:

Re: example of using clause RETURNING

2001-05-21 Thread Jared Still
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