17,380
社区成员
发帖
与我相关
我的任务
分享select * from user_cons_columns where constraint_name=
(select constraint_name from user_constraints where table_name = '表名大写' and constraint_type ='P'); SELECT T.OWNER,T.TABLE_NAME,T.CONSTRAINT_NAME AS PRI_KEY FROM ALL_CONSTRAINTS T
WHERE T.OWNER = UPPER('username')
AND T.TABLE_NAME = UPPER('table_1')
AND T.CONSTRAINT_TYPE = 'P'