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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I know if UPDATE fails?

Re: How do I know if UPDATE fails?

From: nobody <nobody_at_nowhere.com>
Date: Wed, 26 Feb 2003 02:53:18 GMT
Message-ID: <y_V6a.61557$b8v1.31104@news04.bloor.is.net.cable.rogers.com>


create or replace procedure ab is
begin
update junk
set points=4
where points=5;
if sql%rowcount=0 then
dbms_output.put_line('not updated');
end if;
end;
"Ubiquitous" <weberm_at_polaris.net> wrote in message news:b3h8b1$j4s$1_at_news.utelfla.com...
> This is probably a silly question, but I have a script which involves
> performing UPDATEs against a table. I was under the impression that
> using a NO_DATA_FOUND exception would catch any instances where
> the update failed because the row was not found, but that does not
> appear to be happening when I tested it. I suppose I could code a
> SELECT statement with the same criteria as the UPDATE and raise a
> NO_DATA_FOUND exception if it returns 0 rows (ie., the row is not
> found), but that seems to a round-about way to do this. Any ideas?
>
Received on Tue Feb 25 2003 - 20:53:18 CST

Original text of this message

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