Friday, May 9, 2008

Script to report constraints in for a table

REM: Script to report constraints in for a table
REM:*****************************************
REM: NOTE: PLEASE TEST THIS SCRIPT BEFORE USE.
REM: Author will not be responsible for any damage that may be cause by this script.
REM:*****************************************

COL column_name format a30
SET linesize 999

SELECT c1.constraint_name, c2.column_name, c1.constraint_type, c1.delete_rule
FROM user_constraints c1, user_cons_columns c2
WHERE c1.table_name = UPPER ('&Table_Name')
AND c1.constraint_name = c2.constraint_name;

No comments:

Post a Comment

Thanks for you valuable comments !