EXEC sp_helpindex 'Posts' select DISTINCT objects.name A...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

EXEC sp_helpindex 'Posts'

select DISTINCT objects.name AS TableName, 
       indexes.name AS IndexName,
       indexes.type_desc AS TypeName,
       index_columns.column_id
from sys.indexes
INNER JOIN sys.objects ON indexes.object_id = objects.object_id
INNER JOIN sys.index_columns ON indexes.index_id = index_columns.index_id
ORDER BY objects.name, indexes.name, index_columns.column_id

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results