SELECT OBJECT_NAME(ix.Object_id) 'Table Name'
, ix.name 'Index Name'
, col.name 'Index Column Name'
, ix.type_desc 'Index Type'
FROM sys.indexes ix
INNER JOIN sys.columns col
ON col.OBJECT_ID = ix.OBJECT_ID
WHERE ix.OBJECT_ID = OBJECT_ID ('<TABLE_NAME>')
AND col.name = '<COLUMN_NAME>'
No comments:
Post a Comment