Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Foreign key constraints
Try this:
SELECT table_name, constraint_name, column_name
FROM user_cons_columns
WHERE constraint_name IN
(SELECT constraint_name
FROM user_constraints
WHERE constraint_type = 'R'
AND r_constraint_name IN
(SELECT constraint_name
FROM user_constraints
WHERE constraint_type IN ('P','U')
AND table_name='<your_parent_table_name>'
)
)
ORDER BY table_name, constraint_name, position;
Hopte this helps.
Michael Serbanescu
![]() |
![]() |