I have a stored procedure which inserts records into a table. When a duplicate key is detected the process aborts. I want to continue to process the records. What code would I need to insert in the exception area in order to do this ?
not true, if the block was on the procedure, then it would. If it is in-line it wouldn't. For example.
cursor my_cursor is
order by object_name;
for pnt in my_cursor loop;
insert into my_table (pnt.object_name);
when others then null;
The code above will continue inserting, but will skip over any insert that fails for any reason.
You do not need a parachute to skydive. You only need a parachute to skydive twice.