sp_helpindex (T-SQL)

Reports information about the indexes on a table.

Syntax

sp_helpindex [@objname =] 'name'

Arguments
[@objname =] 'name'
Is the name of a table in the current database. name is nvarchar(776), with no default.
Return Code Values

0 (success) or 1 (failure)

Result Sets
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

Remarks

If indexes have been set with the NORECOMPUTE option of UPDATE STATISTICS, that information is shown in the result set of sp_helpindex.

Permissions

Execute permissions default to the public role.

Examples

This example reports on the types of indexes on the sysobjects table.

sp_helpindex sysobjects

  

See Also
CREATE INDEX UPDATE STATISTICS
DROP INDEX DROP STATISTICS
sp_help System Stored Procedures
sp_statistics  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.