You are on page 1of 1

select a.table_name, a.constraint_name, a.constraint_type, a.

r_constraint_name,
b.table_name
from user_constraints a, user_constraints b
where a.r_constraint_name = b.constraint_name(+)
and a.table_name = 'EMP';

select a.table_name, a.constraint_name, a.constraint_type, a.r_constraint_name


reff_cons_name, b.table_name reff_table, c.column_name
from dba_constraints a, dba_constraints b, dba_cons_columns c
where a.r_constraint_name = b.constraint_name(+)
and c.owner='SCOTT'
and c.constraint_name=a.constraint_name(+)
--and c.constraint_name=b.constraint_name
and a.table_name = 'EMP';

select * from dba_cons_columns where constraint_name='FK_DEPTNO';

desc dba_constraints;
desc dba_cons_columns;

You might also like