Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Oracle repository and constraints questions:
Hello,
We are using Oracle 7.3.4.
We can create a foreign key in a table
with something like:
create table junk
(
field1 number(10);
field2 number(5)
constraint foreign_key_constraint references othertable(otherfield)
The question is, what is the query to the
Oracle repository to discover this relationship?
I have been looking at the views:
All_constraints, All_con_columns
and I can find one table name.
Select * From user_cons_columns
OWNER CONSTRAINT_NAME TABLE_NAME ------------------------------ ------------------------------ ----------------- COLUMN_NAME POSITION ------------------------------ ---------
*?****** CATEGORY_CAT_DETAIL_FK CATEGORY
DET1 1
*?****** CATEGORY_CAT_DETAIL_FK CATEGORY
DET2 2
But, how do I find the other table name?
Thanks in advance,
Rodger
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Thu Jul 08 1999 - 13:35:42 CDT
![]() |
![]() |