How to retrieve the Foreign key information in Oracle

From: kennypoon <member6892_at_dbforums.com>
Date: Wed, 11 Jun 2003 03:52:38 +0000
Message-ID: <2988059.1055303558_at_dbforums.com>


I want to know how to retrieve the Foreign Key information in Oracle while using SQL Statement?

I have use three SQL statement to retrieve such information, but the performance is very bad.

The three SQL Statements are:
Select constraint_name, r_constraint_name from all_constraints where constraint_type = 'R' and table_name = table1;

Select column_name from all_cons_columns where constraint_name = cons1;

Select table_name, column_name from all_cons_columns where constraint_name = r_ccons1;

Do anyone know another method to retrieve the Foreign Key information which has better performance?

--
Posted via http://dbforums.com
Received on Wed Jun 11 2003 - 05:52:38 CEST

Original text of this message