Victor
Victor

Reputation: 17107

Oracle find tablename given an index name

I have the name of an index that is existing on some table on some column in the db(oracle 11g). Knowing the name of the index, how can i find which table it belongs to?

Upvotes: 8

Views: 15162

Answers (2)

Fedor
Fedor

Reputation: 86

sometimes you need to find a index by reported constraint name, which might differ from the indexes name, then you could use:

select * from DBA_CONSTRAINTS where CONSTRAINT_NAME='YOUR_CNAME'

or from same view by IndexName as asked by TS:

select * from DBA_CONSTRAINTS where INDEX_NAME='YOUR_INAME'

Upvotes: -1

user330315
user330315

Reputation:

SELECT table_name
FROM all_indexes
WHERE index_name = 'YOUR_INDEX'

Upvotes: 20

Related Questions