RE: table, index, associated constraint

  • From: "Ruth Gramolini" <rgramolini@xxxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 4 Aug 2004 10:29:39 -0400

If you haven't already received an answer...select the table_name from
dba_indexes where table_name in (select table_name from dba_indexes where
index_name in (select object_name from dba_objects)).  This is not complete
but you get the idea.

HTH,
Ruth
-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Barbara Baker
Sent: Tuesday, August 03, 2004 11:52 AM
To: oracle-l@xxxxxxxxxxxxx
Subject: qry: table, index, associated constraint



Does anyone have a query they are willing to share
that displays the table, index, and associated
constraint?

I found the following query on Jonathan Lewis' site
that gives me 2 out of 3 (index and cons), but I can't
see a way to grab the associated table.

Thanks for any help!
Barb

http://www.jlcomp.demon.co.uk/faq/constraints_and_indexes.html
The connection between constraints and the indexes
which are used to check these constraints for the
current user can be described by this query:

select  --+ rule
            o.owner as index_owner
            , o.object_name as index_name
            , n.name as constraint_name
        from    sys.cdef$ c
            , dba_objects o
            , sys.con$ n
        where c.enabled = o.object_id
        and c.con# = n.con#
        and n.owner# = uid
/
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: