How to drop all user tables?

前端 未结 9 581
后悔当初
后悔当初 2020-12-04 04:22

How can I drop all user tables in oracle?

I have problem with constraints. When I disable all it is still no possible.

9条回答
  •  粉色の甜心
    2020-12-04 05:11

    begin
      for i in (select 'drop table '||table_name||' cascade constraints' tbl from user_tables) 
      loop
         execute immediate i.tbl;
      end loop;
    end;
    

提交回复
热议问题