删除全部表数据

    技术2022-05-19  21

    create   or   replace   procedure   truncate_all_table     2     as     3     l_str           varchar2(1000);     4     begin     5     for   x   in   (select * from user_tab_comments  where table_type = 'TABLE')   loop     6     l_str:= 'truncate   table   '||x.tname;     7     execute   immediate   l_str;     8     end   loop;     9     end;


    最新回复(0)