Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL query for foreign keys?
Hi ,
try this
SELECT *
FROM user_cons_columns
WHERE constraint_name IN
( SELECT DISTINCT dt.constraint_name
FROM user_constraints m, -- table with PK user_constraints dt -- table with FK WHERE m.table_name = UPPER( '&1' ) AND m.constraint_name = dt.r_constraint_name );
hth
Kay
Mail: kkanekowski_at_mindcommerce.de Received on Tue Jul 24 2001 - 01:14:40 CDT
![]() |
![]() |