sql -生成清库脚本

利用游标cursor

 

 

declare
cursor c_sor is 
select table_name from user_tables where table_name like upper('pms%');

begin 
 for c in c_sor loop
       dbms_output.put_line('delete from  '|| c.table_name);
       dbms_output.put_line(' call proc_correct_tableandseq( Q'|| c.table_name || ' Q, QidQ, Qseq_' || c.table_name || ' Q)');
end loop;

end

  

posted @ 2018-01-08 13:59  AlisonGavin  阅读(387)  评论(0编辑  收藏  举报