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 -> Re: Bug or Misunderstanding ? Delete...Returning into does not work as I expected

Re: Bug or Misunderstanding ? Delete...Returning into does not work as I expected

From: Erik Ykema <loco.satano_at_xs4all.nl>
Date: Tue, 4 Feb 2003 20:04:19 +0100
Message-ID: <3e400eb9$0$49103$e4fe514c@news.xs4all.nl>


from
http://download-west.oracle.com/docs/cd/A87860_01/doc/appdev.817/a77069/05_o ra.htm#988
%FOUND

Until a SQL data manipulation statement is executed, %FOUND yields NULL. Thereafter, %FOUND yields TRUE if an INSERT, UPDATE, or DELETE statement affected one or more rows, or a SELECT INTO statement returned one or more rows. Otherwise, %FOUND yields FALSE. In the following example, you use
%FOUND to insert a row if a delete succeeds:

DELETE FROM emp WHERE empno = my_empno;
IF SQL%FOUND THEN -- delete succeeded

   INSERT INTO new_emp VALUES (my_empno, my_ename, ...); Received on Tue Feb 04 2003 - 13:04:19 CST

Original text of this message

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