delete exception [message #35429] |
Thu, 10 February 2005 03:49  |
pandian
Messages: 31 Registered: December 2004
|
Member |
|
|
while deleteing a record thru plsql it does not show the no_data_found exception if no record exist for deletion
how can we catch that exception
plz help
pandian
|
|
|
|
|
Re: delete exception [message #35432 is a reply to message #35429] |
Thu, 10 February 2005 04:10  |
Sreedhar Reddy
Messages: 55 Registered: January 2002
|
Member |
|
|
check the below anonymous procedure
SQL> declare
2 begin
3 execute immediate 'delete from sample where id=111';
4 dbms_output.put_line(sql%rowcount||' Records Deleted');
5 end;
6 /
0 Records Deleted
PL/SQL procedure successfully completed.
SQL> declare
2 begin
3 execute immediate 'delete from sample where id=1';
4 dbms_output.put_line(sql%rowcount||' Rocords Deleted');
5 end;
6 /
1 Rocords Deleted
PL/SQL procedure successfully completed.
|
|
|