--查询哪些表没有聚集索引
SELECT * FROM (
SELECT t.name AS tableName,(SELECT TOP 1 name FROM sys.indexes AS i WHERE i.type_desc='CLUSTERED' AND t.[object_id]=i.[object_id]) AS clusteredIndexName
FROM sys.tables AS t
)AS t
WHERE clusteredIndexName IS NULL
ORDER BY tableName
查询哪些表没有聚集索引
最新推荐文章于 2024-09-27 08:30:00 发布