|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
where all the relations and attributes are saved in oracle?
greetings
can any1 plz tell me where all the relations and attributes are saved in oracle? i mean i have to find out a few things in what table all names of relations are stored names and defintions of views names and types of attributes of each reltions are stored and where all integrity constraints are stored plz, i will be grateful if any1 help me thx alot God bless ps. if possible plz email at URL Last edited by pabloj : June 6th, 2004 at 05:16 AM. Reason: More descriptive subject added |
|
#2
|
|||
|
|||
|
Oracle stores these all information in data dictionary, you can execute query any dictionary view by default Oracle grants public to these all views and any user could fetch the required information. Furthur more these all views started by presuffix 'USER' or 'DBA' there are difference between both type of views but i don't wanna go in more depth, just walk through Oracle SQL reference documentation available at Oracle website with no cost. Following is your required query you could make it more specific for you.
set pagesize 500 set line 500 col table_name format a50 col constraint_name format a50 col constraint format a20 col search_condition format a50 col column_name format a30 select a.table_name,a.constraint_name, decode(a.constraint_type,'P','Primary Key','R','Foreign Key','U','Unique Key',null) constraint, b.column_name,a.search_condition FROM user_constraints a, user_cons_columns b where a.constraint_name=b.constraint_name and a.table_name='EMP' Just copy paste it in any editor then save it (for example myquery.sql) in ORACLE_HOME/bin directory and run it as follows: SQL>@myquery |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > need help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|