使用下面的sql: SELECT * FROM User_Constraints s WHERE constraint_type='R'; SELECT * FROM User_Cons_Columns WHERE constraint_name='YOURNAME';
select constraint_name from dba_cons_columns where table_name=''; Alter table XX drop constraint sys…
select a.constraint_name, a.table_name, b.constraint_name from user_constraints a, user_constraints b where a.constraint_type = 'R' and b.constraint_type = 'P' and a.r_constraint_name = b.constraint_name P 代表主键 R 代表外键 通过关联,能查询到你所想要的一切。
使用下面的sql:
SELECT * FROM User_Constraints s WHERE constraint_type='R';
SELECT * FROM User_Cons_Columns WHERE constraint_name='YOURNAME';
Alter table XX drop constraint sys…
from user_constraints a, user_constraints b
where a.constraint_type = 'R'
and b.constraint_type = 'P'
and a.r_constraint_name = b.constraint_name P 代表主键
R 代表外键 通过关联,能查询到你所想要的一切。