declare
table_or_view_doesnt_exist exception;
pragma exception_init ( table_or_view_doesnt_exist, -942 );
begin
begin
execute immediate 'drop table employees_0';
exception when table_or_view_doesnt_exist then null; end;
begin
execute immediate 'drop table employees_2';
exception when table_or_view_doesnt_exist then null; end;
end;
/
create table employees_0 as select * from hr.employees
/
alter table employees_0
add constraint employees_0_pk primary key (employee_id)
using index
/
create table employees_2 as select * from hr.employees where 1=2
/
alter table employees_2
add constraint employees_2_pk primary key (employee_id)
using index
/