Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle indexes

Status
Not open for further replies.

BigDude

IS-IT--Management
Jan 4, 2001
5
0
0
AU
I need to know how to find what column an index is against . I used the following query to determine how many indexs are on the table.

SQL> select * from user_indexes where index_name like 'CARDHLDR_CONTACT%';

But , the result doesnt identify the column indexed.

Any ideas?
 
'Select * from user_indexes' will not serve purpose rightly as it will display all the columns unncessarily. Instead of this you can use USER_IND_COLUMNS. It looks like you know the index name , the table and column name can be found in this view. For other details see the USER_INDEXES view.

I hope this will help
Amol New to dba world, so please ......
 
SELECT index_name, column_name
FROM dba_ind_columns
WHERE index_name LIKE 'CARDHLDR_CONTACT%'
ORDER BY position;

The ORDER BY clause will arrange the columns in the order they're referenced in the index in the event that you have a composite index.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top