Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: no matching record for update or delet in pl/sql
SQL%FOUND and SQL%NOTFOUND.
SQL> create table bogus (column1 varchar2(10));
Table created.
Elapsed: 00:00:00.17
SQL> insert into bogus values('Hello Jim');
1 row created.
Elapsed: 00:00:00.24
SQL> begin
2 Update Bogus set column1 = 'Not There' where column1 = 'Hello Jim';
3 If SQL%NOTFOUND THEN
4 Insert into Bogus values('There Now!');
5 End If;
6 end;
7 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.12
SQL> select * from bogus;
COLUMN1
Elapsed: 00:00:00.01
SQL> SQL> SQL> begin
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
SQL> select * from bogus;
COLUMN1
Elapsed: 00:00:00.00
SQL>
jim wrote:
> jim agans
>
> matching record for update or delet in pl/sql
>
> Hello....
>
> I would like to find if it is possible to check to see if a update or delet
> statement in oracle found a matching record to operate on.
> The EXCEPTION wont pick it up ..( you get a msg "0 records deleted " or
> "0 records updated ") Is there a way to pick this up to notify a user??
Received on Fri Dec 07 2001 - 14:50:10 CST
![]() |
![]() |