CREATE OR REPLACE PROCEDURE DROPEXITSTABS
(TAB_NAME_IN IN varchar2) IS
v_cnt Number;
begin
select count(*)
into v_cnt
from user_tables
where table_name = upper(TAB_NAME_IN);
if v_cnt>0 then
execute immediate 'drop table ' || TAB_NAME_IN ||' purge';
end If;
end DROPEXITSTABS;
call DROPEXITSTABS('ZYWSPT-ZYWSSJJ');
create table "ZYWSPT-ZYWSSJJ" ( ID NUMBER(20) not null,ZBDM NVARCHAR2(20) null,NBBSF NVARCHAR2(30) null,SJYBSF NVARCHAR2(30) null,SJYMC NVARCHAR2(50) null,DY NVARCHAR2(200) null,SJLX NVARCHAR2(10) null,BSGS NVARCHAR2(10) null,YXZ NVARCHAR2(200) null,BZ NVARCHAR2(200) null,DLZ NVARCHAR2(20) null,DLSJ TIMESTAMP null,GXZ NVARCHAR2(20) null,GXSJ TIMESTAMP null,constraint "PK_ZYWSPT-ZYWSSJJ" primary key (ID) );