arsenal
arsenal

Reputation: 24144

Show me the index on the table in Oracle

Problem Statement:-

Given a oracle table name how can I find out whether there is any index being created on a particular column in that table?

I know its a very basic question, I am not that much familiar with SQL stuff so that's why having problem. So posting here if anyone can help me out?

Upvotes: 0

Views: 352

Answers (1)

DCookie
DCookie

Reputation: 43523

SELECT index_name
  FROM all_ind_columns
 WHERE table_name = 'THE_TABLE'
   AND column_name = 'THE_COLUMN'
   AND index_owner = 'THE_OWNER';

This should tell you the name of any index on 'THE_COLUMN' in table 'THE_TABLE' with owner 'THE_OWNER'. The column may or may not be the only column in the index.

Become friends with the dictionary. It will help you!

Upvotes: 1

Related Questions