作为拥有该表的用户,您可以执行以下操作:
select constraint_name, status, deferrable, deferred, validated, generated
from user_constraints
where constraint_type = 'P' and table_name = 'Table Name'
更新:我认为这可以满足您的需求.
SELECT cols.table_name, cols.column_name, cols.position, cons.status, cons.owner
FROM all_constraints cons, all_cons_columns cols
WHERE cols.table_name = 'Table Name'
AND cons.constraint_type = 'P'
AND cons.constraint_name = cols.constraint_name
AND cons.owner = cols.owner
ORDER BY cols.table_name, cols.position
您可以查看this网站了解更多详情.