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: How to find all index related to a table?

Re: How to find all index related to a table?

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Thu, 6 Jan 2000 17:15:30 +0100
Message-ID: <852f36$1mp7$1@news5.isdnet.net>


Follows a nice script that gives all indexes with their columns for the current user. It gives also the uniqueness of the index and if it is part of a constraint:

break on table_name skip 1 on index_name on uniqueness on constraint_type select i.table_name, i.index_name,

       decode(i.uniqueness, 'UNIQUE', 'U', '') uniqueness,
       c.constraint_type,
       substr(ic.column_name,1,30) column_name
from user_constraints c, user_ind_columns ic, user_indexes i where c.owner (+) = USER
  and c.constraint_name (+) = i.index_name   and ic.index_name = i.index_name
order by 1, 2, column_position
/

--
Have a nice day
Michel

Jeff <kit_at_cintec.cuhk.edu.hk> a écrit dans le message : 851lmu$fs9$1_at_justice.csc.cuhk.edu.hk...
> Hi,
>
> How can you retreive the index list and their details related to a table
> specified?
>
> Thanks.
>
> Jeff
>
>
Received on Thu Jan 06 2000 - 10:15:30 CST

Original text of this message

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