Reports information about the indexes on a table.
sp_helpindex [@objname =] 'name'
0 (success) or 1 (failure)
| Column name | Data type | Description |
|---|---|---|
| index_name | sysname | Index name |
| index_description | varchar(210) | Index description |
| index_keys | nvarchar(2078) | Table column(s) upon which the index is built |
If indexes have been set with the NORECOMPUTE option of UPDATE STATISTICS, that information is shown in the result set of sp_helpindex.
Execute permissions default to the public role.
This example reports on the types of indexes on the sysobjects table.
sp_helpindex sysobjects
| CREATE INDEX | UPDATE STATISTICS |
| DROP INDEX | DROP STATISTICS |
| sp_help | System Stored Procedures |
| sp_statistics |