How do you find the original table and column a foreign key refering to?

From: sc <cfs3526_at_hotmail.com>
Date: Tue, 22 Feb 2000 08:54:36 -0500
Message-ID: <951227676.481092_at_newsreader-hpw1.net.bms.com>



I use

[Quoted] Select R_CONSTRAINT_NAME from user_constraints Where table_name='XXX' and constraint_type='F';

After I got the R_CONSTRAINT_NAME, I use it to search against the user_constraints, like

Select TABLE_NAME from user_constraints
where constraint_name='R_CONSTRAINT_NAME';

and then I need to search against the user_cons_columns to get the refered column name,

Is this the only way to go, or there is more efficient way to do this?

Thank you for your help. Received on Tue Feb 22 2000 - 14:54:36 CET

Original text of this message