Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Returning clause in Delete

Returning clause in Delete

From: A. Jensen <auj_at_storebrand.no>
Date: Tue, 7 Dec 1999 15:57:04 +0100
Message-ID: <Zh934.4870$8Z4.49236@news1.online.no>


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;

begin

    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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US