Compare Page Revisions
« Older Revision - Back to Page History - Newer Revision »
create view dbo.DbIndexes as select TableName = o.name ,IndexName = idx.Name ,ColumnNames = string_agg(c.name, ',') within group (order by c.name) from sys.indexes idx inner join sys.tables o on idx.object_id = o.object_id inner join sys.index_columns ic on idx.index_id = ic.index_id and idx.object_id = ic.object_id inner join sys.columns c on ic.column_id = c.column_id and c.object_id = o.object_id group by o.name ,idx.name
ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.