Logo

SQL Script

Indexes belonging to a tables

Tested on Oracle 8.1

Updated : 4-Mar-2002
Version : 1.1

Description

This script lists index details for a given table and index owner. Everyone should have a script that does this !

Parameters

&tab_name - The table name that the index is on
&own - The index schema owner.

SQL Source

ACCEPT own PROMPT 'Enter value for index owner : '
ACCEPT tab_name PROMPT 'Enter value for index tables : '

col index_name form a25
col table_name form a20
col column_name form A20
col column_position form 99 Heading "Pos"

break on table_name on index_name

select table_name, index_name, column_name ,column_position ,descend
from all_ind_columns 
where table_name = UPPER('&tab_name')
and index_owner=UPPER('&own')
order by table_name, index_name,column_position;

Previous Oracle Version Links

Version 8.0 Indexes belonging to a tables

Return to Index of SQL Scripts


Home | Company Profile | Services | Contact Us | SQL scripts and tips | Quiz
Legal

Logo