View Single Post
Old 07-15-2009, 10:25 AM   #3 (permalink)
Suman Gadikrindi
 
Newb Techie

Join Date: Jul 2009

Posts: 1

Suman Gadikrindi is on a distinguished road

Thumbs up Re: Foriegn key reference table in oracle

Quote:
Originally Posted by vishnunekkanti View Post
Hello

Can any one help me how I can find a table that has foreign key references from other table?

Thanks in advance


Vishnu
Enjoy with the following statement :happy: :

select acc.table_name REFERENCING_TABLE_NAME, acc.column_name REFERENCING_COLUMN_NAME
from all_constraints ac1,
all_constraints ac2,
all_cons_columns acc
where ac1.constraint_type = 'P'
and ac1.table_name = :table_name
and ac2.r_constraint_name = ac1.constraint_name
and ac2.constraint_name = acc.constraint_name;

Regards,
Suman Gadikrindi
Logica
Suman Gadikrindi is offline