ORACLE 判断表是否存在|不存在则新建|存在则先删除后新建
declare
i integer;
begin
select count(*) into i from user_tables where table_name = 'TMP_T_CATER_DELIVERYADDRESS';
if i > 0 then
dbms_output.put_line('该表已存在!');
execute immediate 'DROP TABLE TMP_T_CATER_DELIVERYADDRESS';
else
dbms_output.put_line('该表不存在');
end if;
execute immediate 'CREATE TABLE TMP_T_CATER_DELIVERYADDRESS(id int primary key,name varchar(50))';
end;