Oracle中查询所有外键引用到某张表的记录

来自ling
跳转至: 导航搜索
select * from user_constraints e where e.table_name=UPPER('tms_md_customer');
select b.table_name,b.column_name from user_constraints a 
inner join user_cons_columns b
on a.constraint_name = b.constraint_name
where a.r_constraint_name='PK_TMS_MD_CUSTOMER'
强制删除表
DROP TABLE TB1 CASCADE CONSTRAINTS