Query to find the columns on which index is existent

select c.name as “table_name” ,b.name as “column_name”,d.name as “index Name” from sys.index_columns a, sys.columns b , sys.objects c , sys.indexes d
where a.object_id=b.object_id and a.column_id=b.column_id and c.object_id=b.object_id
and d.object_id=c.object_id
order by c.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