Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Returning clause in Delete
Hi
I have a PLSQL-block in which I delete records from a table. I would like to
log the IDs of the deleted records, so I thought using the RETURNING-clause
would do the trick.
But I don't understand how to return more than one record.
declare
TYPE t_bind IS TABLE OF bet.betform%TYPE INDEX BY BINARY_INTEGER; bind t_bind;
delete
from bet
where geb < 80
returning betform into bind;
FOR i IN 1..bind.count LOOP
dbms_output.put_line(bind(i));
END LOOP;
end;
gives PLS-00385 error
Any ideas?
AJ Received on Tue Dec 07 1999 - 08:57:04 CST
![]() |
![]() |