查找表的主键(包括名称,构成列)

select cu.*
from user_cons_columns cu, user_constraints au
where cu.constraint_name = au.constraint_name
and au.constraint_type = 'P'
and au.table_name = '表名'

注意:表名一定要大写

 

posted @ 2019-11-22 14:45  0x141026  阅读(237)  评论(0)    收藏  举报