Friday, March 5, 2010

Get disabled constraints

SELECT OWNER,TABLE_NAME,
CONSTRAINT_NAME,
DECODE(CONSTRAINT_TYPE,
'C','Check',
'P','Primary Key',
'U','Unique',
'R','Foreign Key',
'V','With Check Option') AS CONSTRAINT_TYPE
FROM dba_constraints
WHERE STATUS = 'DISABLED'
ORDER BY OWNER, TABLE_NAME, CONSTRAINT_NAME

No comments:

Post a Comment