Could anyone let me know the name for the exception ORA-00942 (table or view does not exist).
Actually I am trying to write a pl sql script which drops a table if it does not exist.
Intention is to use simple exception handling to catch the "table or view does not exist" on execution
of the stament : drop table my_table;
Below is the script
drop_sql := 'drop table my_table';
EXECUTE IMMEDIATE drop_sql;
WHEN <what should go in here to catch table or view not exixts i.e. ORA-00942 exception>
-- Use this to trap the ORA-00942: table or view does not exist
WHEN OTHERS THEN
< Want to throw back the exception when its not ORA-00942 i.e table or view not exists >