Pet*_*hia 17
对于特定数据库中的所有非聚簇索引:
select object_name(object_id) as tablename, *
from sys.indexes where type_desc = 'NONCLUSTERED'
Run Code Online (Sandbox Code Playgroud)
这将返回系统表和非系统表.或者:
select t.name as tablename, i.*
from sys.indexes i, sys.tables t
where i.object_id = t.object_id
and i.type_desc = 'NONCLUSTERED'
Run Code Online (Sandbox Code Playgroud)
仅适用于用户土地非聚集索引.