首頁 >資料庫 >mysql教程 >获取SQL Server数据库中的聚簇索引信息

获取SQL Server数据库中的聚簇索引信息

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB原創
2016-06-07 14:57:501148瀏覽

获取SQLServer数据库中的聚簇索引信息 无 SELECT t.name [表名],ix.name [聚簇索引名称],c.name [聚簇索引包括字段] from sys.indexes ixINNER JOIN sys.tables t ON ix.object_id = t.object_id AND ix.type_desc = 'CLUSTERED' AND t.type = 'U'INNER JOIN

获取SQL Server数据库中的聚簇索引信息
SELECT t.name [表名],ix.name [聚簇索引名称],c.name [聚簇索引包括字段] from sys.indexes ix
INNER JOIN sys.tables t ON ix.object_id = t.object_id AND ix.type_desc = 'CLUSTERED' AND t.type = 'U'
INNER JOIN sys.index_columns ic ON ic.index_id = ix.index_id and ix.object_id = ic.object_id
INNER JOIN sys.columns c ON ic.column_id = c.column_id and ic.object_id = c.object_id
ORDER BY [表名]
?
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn