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.youkuaiyun.com/t/20010827/10/257938.html
本文提供了一段SQL查询代码,用于从Oracle数据库中查找特定所有者(ITIL_SJ)的所有表的名称,这些表拥有定义为主键(P)的约束。
2万+

被折叠的 条评论
为什么被折叠?



