Home » SQL & PL/SQL » SQL & PL/SQL » dictionnary
dictionnary [message #770] Mon, 04 March 2002 00:29 Go to next message
philarmo
Messages: 15
Registered: February 2002
Junior Member
hi,
which sys table can i find the link between all table ?.
I had a look into user_constraint but no seems good
Re: dictionnary [message #771 is a reply to message #770] Mon, 04 March 2002 01:10 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
what do u mean by "link between all table". can u explain little bit more
Re: dictionnary [message #786 is a reply to message #770] Mon, 04 March 2002 08:25 Go to previous messageGo to next message
philarmo
Messages: 15
Registered: February 2002
Junior Member
imagine first table s_dept with
id = primary key
name = foreign key
region = foreign key

second table dept_1
id= primary key
name = varchar2
region=varchar2

so dept_1 fills s_dept with name and region
So i know that some parts of oracle dictionary show the constraint into tables. I would like to see the constraint of s_dept linked with dept_1
Re: dictionnary [message #794 is a reply to message #786] Mon, 04 March 2002 23:36 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
try this query

select u1.constraint_name,u1.constraint_type,u2.table_name
from user_constraints u1,
user_constraints u2
where u1.table_name='EMP'
and u2.constraint_name=u1.r_constraint_name
and u1.constraint_type='R'

also use the user_cons_columns
Re: dictionnary [message #814 is a reply to message #794] Tue, 05 March 2002 22:57 Go to previous message
philarmo
Messages: 15
Registered: February 2002
Junior Member
your request works but i still don t see my constraint i explain that : i have a table 'structure'

name surname adress country

and i have a table 'country'
id country
.
the table structure is filled by country.
But i can t see any constraint about it. Is it possible that some constraints are hidden or else ?
Previous Topic: tablespace
Next Topic: Re: how to copy table content from one to another with order
Goto Forum:
  


Current Time: Fri Apr 19 20:23:09 CDT 2024