Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Oracle repository and constraints questions:

Oracle repository and constraints questions:

From: <argosy22_at_my-deja.com>
Date: Thu, 08 Jul 1999 18:35:42 GMT
Message-ID: <7m2r1t$j9s$1@nnrp1.deja.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US