SQL> col type format a15
col constraint_name format a30
select decode (constraint_type,
'C', 'Check',
'O', 'R/O View',
'P', 'Primary',
'R', 'Foreign',
'U', 'Unique',
'V', 'Check view') type,
constraint_name,status,last_change
from user_constraints where
table_name = 'EMP' order by 1;
TYPE CONSTRAINT_NAME STATUS LAST_CHANGE
--------------- -------------------------------------------------------------------------------
Foreign FK_DEPTNO ENABLED 30-MAR-10
Primary PK_EMP ENABLED 30-MAR-10
Happy Learning....
No comments:
Post a Comment