Query sys.indexes : sys.indexes « System Tables Views « SQL Server / T-SQL Tutorial






5> SELECT top 10 name 'Type name', type_desc 'Type description', is_primary_key
6> FROM sys.indexes
7> GO
Type name                                                                                                                        Type description                                             is_primary
_key
-------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------ ----------
----
clust                                                                                                                            CLUSTERED
   0
clust                                                                                                                            CLUSTERED
   0
clust                                                                                                                            CLUSTERED
   0
NULL                                                                                                                             HEAP
   0
clust                                                                                                                            CLUSTERED
   0
clust                                                                                                                            CLUSTERED
   0
clst                                                                                                                             CLUSTERED
   0
clust                                                                                                                            CLUSTERED
   0
clst                                                                                                                             CLUSTERED
   0
nc1                                                                                                                              NONCLUSTERED
   0

(10 rows affected)








27.8.sys.indexes
27.8.1.Query sys.indexes