|
Re: FOREINKEY CONSTRAINT'S REFERENCE TABLE INFORMATION [message #119 is a reply to message #116] |
Tue, 15 January 2002 05:18   |
pratap kumar tripathy
Messages: 660 Registered: January 2002
|
Senior Member |
|
|
columns referenced
===================
select table_name,column_name from user_cons_columns where CONSTRAINT_NAME='EMP_FOREIGN_KEY';
table referenced
===================
select table_name from user_constraints
where constraint_name
=(select r_constraint_name
from user_constraints
where CONSTRAINT_NAME='EMP_FOREIGN_KEY');
|
|
|
Re: FOREINKEY CONSTRAINT'S REFERENCE TABLE INFORMATION [message #136 is a reply to message #116] |
Thu, 17 January 2002 03:34  |
Ayyappan pillai Sujith Ku
Messages: 6 Registered: November 2001
|
Junior Member |
|
|
Thak you Pradap for the timly help.
For the information abt the reference table and the related reference colums, the following query helped me.
SELECT TABLE_NAME,COLUMN_NAME FROM USER_CONS_COLUMNS WHERE CONSTRAINT_NAME =(SELECT R_CONSTRAINT_NAME FROM USER_CONSTRAINTS WHERE CONSTRAINT_NAME='XXX_FK')
Thanks
sujith
|
|
|