Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Find Index definition for an Oracle table
Hi
Try this script, you will get indexes on all tables in a user's schema. You may need to log into SQL*Plus as that user or have access to his tables. User_id is like OPS$XYZ.
Good luck !!!
REM
REM Author : Oracleguru REM Date : 01/31/95 REM File Name : describe_indices.sql REM Usage : On sqlplus prompt enter: REM @describe_indices user_id REM REM Description: Describes Indices in a User's Schema. REM It is assumed that you can access that user's objects.REM
column table_name format a31 column index_name format a31 column column_name format a31 column seq format 999 column uniqueness format a10
to_char(sysdate,'HH:MI:SS AM') today_time
from dual;
spool $HOME/rep/describe_indices.lst
select a.table_name table_name, a.index_name index_name, a.column_name, a.column_position seq, b.uniqueness from all_ind_columns a, all_indexes b where a.table_owner = upper('&1') and a.index_name = b.index_name
prompt . ********** -END OF REPORT **********
timbedow_at_my-dejanews.com wrote in article
<6s2dl5$qip$1_at_nnrp1.dejanews.com>...
> I need to know how to find an index definition for an Oracle table. I see
it
> in user_indexes, but I want to know which columns it is indexing.
> Specifically, I want to know if a specific column is indexed within a
table.
>
> Please respond to the email below ASAP!
>
> TIA,
>
> Tim.
> tim.bedow_at_NO_SPAMps.net
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>
Received on Thu Aug 27 1998 - 08:58:30 CDT
![]() |
![]() |