March 7, 2012 at 5:28 am
Just looking at the new include syntax (from 05 on).
Can't figure out where I can see which columns have been 'included' in an index.
These all show only the index column. Not the extra column covered by the include syntax.
sp_help
sp_helpindex.
sysindexes
Am I missing something obvious?
March 7, 2012 at 5:39 am
elect c.name, ic.*
from sys.index_columns ic
join sys.indexes i
on i.object_id = ic.object_id
and i.index_id = ic.index_id
join sys.columns c
on c.object_id = i.object_id
and c.column_id = ic.column_id
where i.name = '[IndexName]'
and i.object_id = object_id('[TableName]')
and ic.is_included_column = 1
March 7, 2012 at 6:46 am
great, thanks. that's perfect.
March 7, 2012 at 6:49 am
You can use XDetails Addin to see included columns and other details:
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply