Created
June 13, 2018 08:38
-
-
Save matejskubic/b6fb63c57fbdb6dd0c11ea6b226d096d to your computer and use it in GitHub Desktop.
List columns on table index [mssql]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
COL_NAME(ic.object_id, ic.column_id) colName | |
, * | |
from sys.index_columns ic | |
join sys.indexes i | |
on i.object_id = ic.object_id | |
and i.index_id = ic.index_id | |
where i.object_id = object_id('[dbo].[ProjGroup]') | |
--and i.is_primary_key = 1 | |
--and ic.is_included_column = 0 | |
--and i.name='I_588GROUPIDX' | |
order by ic.index_id, ic.key_ordinal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment