oracle drop temporary table

Solutions on MaxInterview for oracle drop temporary table by the best coders in the world

showing results for - "oracle drop temporary table"
Michael
28 Jun 2020
1CREATE OR REPLACE PROCEDURE p AS
2    table_or_view_not_exist EXCEPTION;
3    PRAGMA EXCEPTION_INIT (table_or_view_not_exist, -942);
4    attempted_ddl_on_in_use_GTT EXCEPTION;
5    PRAGMA EXCEPTION_INIT (attempted_ddl_on_in_use_GTT, -14452);
6BEGIN
7    EXECUTE IMMEDIATE 'DROP TABLE t';
8
9EXCEPTION
10    WHEN table_or_view_not_exist THEN
11        dbms_output.put_line('Table t did not exist at drop time. Continuing.');
12
13    WHEN attempted_ddl_on_in_use_GTT THEN
14        dbms_output.put_line('Help ! Someone is doing my job!');
15        dbms_output.put_line('Please rescue me');
16        RAISE;
17END p;