我写了一段 批量 清空 或者 删除 数据库表 但是要是有 外关联的 就无法删除
没有的 就可以
declare
Cursor cur is select table_name from all_tables where TABLE_NAME LIKE 'XJG%'; rs cur%rowtype;
for rs in cur loop
begin
execute immediate 'drop table ' || rs.table_name;
dbms_output.put_line(rs.table_name);
end;
end loop;
end;
但是 由外部关联的清空不了 报错 ORA—02449
能帮我看一下吗?
没有的 就可以
declare
Cursor cur is select table_name from all_tables where TABLE_NAME LIKE 'XJG%'; rs cur%rowtype;
for rs in cur loop
begin
execute immediate 'drop table ' || rs.table_name;
dbms_output.put_line(rs.table_name);
end;
end loop;
end;
但是 由外部关联的清空不了 报错 ORA—02449
能帮我看一下吗?
