Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: Index Columns - SQL Server

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: Tue, Aug 28, 2012, 10:54 AM


select
     IndexName = i.name
    ,TableName = o.name
    ,ColumnName = c.name
    
from
    sys.indexes i

    inner join sys.objects o
        on i.object_id = o.object_id

    inner join sys.index_columns ic
        on i.index_id = ic.index_id

    inner join sys.columns c
        on ic.column_id = c.column_id
        and c.object_ID = O.OBJECT_ID

where 1=1
    and o.type = 'u'

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.