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 -> Re: Does anyone have a script to display hierarchy of tables starting with a specific one

Re: Does anyone have a script to display hierarchy of tables starting with a specific one

From: Didier LENQUETTE <didier.lenquette_at_steria.fr>
Date: 2000/04/13
Message-ID: <XgjJ4.24$m66.694@nreader3.kpnqwest.net>#1/1

Hi !

Try something like this :

create table my_table as
select
OWNER ,

CONSTRAINT_NAME        ,
CONSTRAINT_TYPE        ,
TABLE_NAME             ,

R_CONSTRAINT_NAME
from user_constraints;

SELECT Substr (lpad ('*', level, '-')|| table_name, 1, 30) FROM my_table
WHERE constraint_type != 'C'
START WITH table_name = ...
-- AND CONSTRAINT_TYPE = 'R'
CONNECT BY PRIOR CONSTRAINT_NAME = R_CONSTRAINT_NAME /

A+

Eric <ebektech_at_videotron.ca> a écrit dans le message : n3dA4.41$585.157570_at_news.magma.ca...
> based on the fk-pk relationship...
>
> example:
> employee
> dept
> store
> marital_status
> address
> country
> .
> .
> .
>
>
>
Received on Thu Apr 13 2000 - 00:00:00 CDT

Original text of this message

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