我正在寻找一个脚本来查找数据库中没有主键的表。
发布于 2014-09-15 13:17:09
select table_name from user_tables
minus
select table_name
from all_constraints
where (constraint_type ='P' ) and owner='dbSID_here'发布于 2015-09-14 12:35:31
有一个更简单的方法:
选择table_name从user_tables中选择table_name NOT IN (从user_constraints中选择table_name,其中constraint_type ='P‘);
来自这里。
https://dba.stackexchange.com/questions/76554
复制相似问题