Answers for "oracle list constraints"

SQL
0

oracle list constraints

SELECT *
FROM ALL_CONSTRAINTS c,
     ALL_CONS_COLUMNS cols
WHERE c.CONSTRAINT_TYPE = 'P'
  AND c.CONSTRAINT_NAME = COLS.CONSTRAINT_NAME
  AND c.OWNER = COLS.OWNER
  AND c.OWNER = 'schema_name'
  AND cols.TABLE_NAME = 'table_name'
ORDER BY cols.TABLE_NAME, COLS.POSITION;
Posted by: Guest on July-11-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language