现在的位置: 首页 > 综合 > 正文

oracle 查找有主键的表的方法

2012年08月28日 ⁄ 综合 ⁄ 共 295字 ⁄ 字号 评论关闭

select   DISTINCT b.table_name  from   ALL_CONS_COLUMNS   a,ALL_CONSTRAINTS   b    
  where   a.constraint_name   =   b.constraint_name     and   constraint_type   =   'P' and a.owner='ITIL_SJ'

 

 

constraint_type   =   'P'   键的类型

owner  数据库用户名

constraint_name  约束名

 

 

可以参照帖子:http://topic.csdn.net/t/20010827/10/257938.html

 

抱歉!评论已关闭.