Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

sp_helpindex (Transact-SQL)


Applies To: SQL Server 2014, SQL Server 2016 Preview

Reports information about the indexes on a table or view.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database.

Topic link icon Transact-SQL Syntax Conventions

sp_helpindex [ @objname = ] 'name'

[ @objname = ] 'name'

Is the qualified or nonqualified name of a user-defined table or view. Quotation marks are required only if a qualified table or view name is specified. If a fully qualified name, including a database name, is provided, the database name must be the name of the current database. name is nvarchar(776), with no default.

0 (success) or 1 (failure)

Column name

Data type




Index name.



Index description including the filegroup it is located on.



Table or view columns upon which the index is built.

A descending indexed column will be listed in the result set with a minus sign (-) following its name; an ascending indexed column, the default, will be listed by its name alone.

If indexes have been set by using the NORECOMPUTE option of UPDATE STATISTICS, that information is included in the index_description column.

sp_helpindex exposes only orderable index columns; therefore, it does not expose information about XML indexes or spatial indexes.

Requires membership in the public role.

The following example reports on the types of indexes on the Customer table.

USE AdventureWorks2012;
EXEC sp_helpindex N'Sales.Customer';
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft