|
SQL> SELECT c.constraint_name, c.constraint_type,
cc.column_name
FROM dba_constraints c, dba_cons_columns cc
WHERE c.owner=¡®SCOTT¡¯
AND c.table_name=¡®EMPLOYEES¡¯
AND c.owner = cc.owner
AND c.constraint_name = cc.constraint_name
ORDER BY cc.position;
CONSTRAINT_NAME C COLUMN_NAME
--------------------- - ----------------
EMP_DEPT_FK R DEPTNO
EMP_PK P EMPNO
SYS_C00565 C LAST_NAME
3 rows selected.
|