Foreign Key view in Oracle [message #522106] |
Tue, 06 September 2011 09:14  |
gp185007
Messages: 45 Registered: April 2005 Location: Mumbai
|
Member |
|
|
Hi All,
Is there any view in oracle which gives the foreign key mapping.
E.g.
Table DEPT has DEPTNO as PK.
Table Emp has DEPTNO as FK to DEPT.DEPTNO.
I can get the information for DEPT table from R_CONSTRAINT_NAME column of all_constraints table.
My requirement is to get the the which column of Emp table refers to DEPT.DEPTNO column .
Regards,
Ganesh
|
|
|
|
|
Re: Foreign Key view in Oracle [message #522110 is a reply to message #522106] |
Tue, 06 September 2011 10:15  |
 |
Michel Cadot
Messages: 68764 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
All these questions can be answered either refering to Database Reference which contains the description of all catalog views and it is easy to find CONSTRAINT in its toc; either using DICT view in the following way:
select * from dict where lower(comments) like '%constraint%';
Hope you will not have to repost such question now.
Regards
Michel
|
|
|