日期:2014-05-17 浏览次数:20930 次
declare str_tabprefix varchar2(30); str_tabsuffix varchar2(30); str_tabname varchar2(30); int_exists number; begin str_tabprefix := 'imei_imeicount_'; str_tabsuffix := to_char(sysdate, 'yyyymm'); str_tabname := str_tabprefix || str_tabsuffix; select count(*) into int_exists from tabs where table_name = upper(str_tabname); if (int_exists = 0) then execute immediate 'create table ' || str_tabname || '(text varchar2(200))'; end if; end;