Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: NEED SCRIPT: list all constraints
In response to many requests, I have included a
second version of the view mentioned below
on my web site which shows owner names
instead of id's (see below).
John
>Visit my web site http://members.aol.com/jomarlen
>and, on my Oracle Utilities page you'll find the
>ddl for a view ALL_FK_CONSTRAINTS
>
>SQL> desc all_fk_constraints
> Name Null? Type
> ------------------------------- -------- ----
> CONSTRAINT_NAME NOT NULL VARCHAR2(30)
> PARENT_TABLE_OWNER NOT NULL NUMBER
> PARENT_TABLE NOT NULL VARCHAR2(30)
> PARENT_COLUMN NOT NULL VARCHAR2(30)
> CHILD_TABLE_OWNER NOT NULL NUMBER
> CHILD_TABLE NOT NULL VARCHAR2(30)
> CHILD_COLUMN NOT NULL VARCHAR2(30)
> CASCADE_DELETE VARCHAR2(3)
> CHILD_TABLE_ID NOT NULL NUMBER
> CHILD_COLUMN_ID NOT NULL NUMBER
>
>This will tell you about your foreign keys which I guess is what you are
>interested in.
>
>The one drawback is that the table owners are shown as
>the user#. This is because this view is used in forms to
>enforce RI on the client side (see article about this on
>the same page) and the 2 additional joins needed to
>resolve username from user# kill performance stone dead.
>
>
Received on Sat Oct 04 1997 - 00:00:00 CDT