首页 > 其他 > 详细

查找某个表被哪些表引用。外键

时间:2017-11-30 14:43:58      阅读:247      评论:0      收藏:0      [点我收藏+]

select fk_col.constraint_name, fk_col.table_name, fk_col.column_name
  from user_constraints pk, user_constraints fk, user_cons_columns fk_col
 where pk.table_name = ‘TEST‘
   and pk.constraint_type = ‘P‘
   and fk.r_constraint_name = pk.constraint_name
   and fk_col.constraint_name = fk.constraint_name
 order by 2, 3;

查找某个表被哪些表引用。外键

查找某个表被哪些表引用。外键

原文:http://www.cnblogs.com/kakaisgood/p/7928776.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!