Oracle: How to find indexed table-columns

Wanna know which columns of your tables are indexed?

Use this:

SELECT 
  a.owner,
  a.table_name,
  b.index_name,
  b.column_name
FROM dba_tables a
  LEFT JOIN dba_ind_columns b
  ON a.table_name=b.table_name  
WHERE a.owner  ='TEST'
ORDER BY a.table_name,b.index_name,b.column_name;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: