Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

does a delete throw a when no data found exception when no records arefound

csphardJan 28 2009 — edited Jan 28 2009
When performing a delete in pl sql it does not throw a when no_data_found when it
finds no records to delete. Is this correct?

Should we check for the item first and then do an if statement with a dbms_output.put_line

declare

begin

delete from demo_orders where order_id = 99;

exception
when no_data_found then

apex_application.g_print_success_message := '<p style="font-family:arial; font-size: 20px;
color: red;">Error: No records were found!</p>';


end;

Thanks
Howard
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 25 2009
Added on Jan 28 2009
2 comments
2,768 views