Many times we required to find out all the indexes related to a table with some details like type of index, index name and name of column that hold this index.
SQL Server provide 'sp_helpindex' system procedure for this purpose, now we take some example how to use this stored procedure and get information related to index.
Syntax:
Exec sp_helpindex 'Table_Name' ;
Example:
Get Index information for all tables:
Syntax:
EXEC sp_msforeachtable 'Exec sp_helpindex ''?'' '
Example: