查看表是否与其他表存在主外鍵约束

来源:互联网 发布:淘宝店铺活动方图800 编辑:程序博客网 时间:2024/06/06 07:40

通过以下SQL语句:

 

          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
and a.table_name='DT_AS_SERVICE_DISPATCH'

原创粉丝点击