Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DELETE FROM table T RETURNING T.* - i.e. %ROWTYPE - BULK INTO Cursor"%ROW

philippekoNov 10 2009 — edited Nov 10 2009
Dear All,

h1: I would like to use DELETE FROM table T RETURNING T.* - i.e. for %ROWTYPE - BULK INTO "Cursor%ROWTYPE" without detailling all the fields


declare
type enum_CaseKey is table of CASES.CASEKEY%type;
peCaseKeys enum_CaseKey;

type enum_CaseRow is table of cases%rowtype;
peCaseRows enum_CaseRow;

cursor cSpecialCases is select * from Cases where <special_clause>;

begin
-- select C.* bulk collect into peCaseRows works fine !
delete from cases C
where <Clauses>
returning C.*
bulk collect into peCaseRows;

dbms_output.PUT_LINE ('Deleted #' || sql%rowcount || ' Rows:' );

end;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 8 2009
Added on Nov 10 2009
1 comment
773 views