Thanks for the question, Manoj.
Asked: August 22, 2017 - 5:42 pm UTC
Last updated: August 23, 2017 - 4:36 am UTC
Version: Oracle 12c
Viewed 1000+ times
SQL> begin 2 loop 3 begin 4 execute immediate 'drop table t'; 5 exit; 6 exception 7 when others then 8 if sqlcode = -54 then 9 dbms_output.put_line('Failed, sleeping'); 10 dbms_lock.sleep(5); 11 else 12 raise; 13 end if; 14 end; 15 end loop; 16 end; 17 / Failed, sleeping Failed, sleeping PL/SQL procedure successfully completed.
A reader, August 23, 2017 - 7:28 am UTC
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library