List of indexes from a specific table – SQL Server

An earlier post described that the system catalog views sys.indexes and sys.index_columns make it easy to get a list of all indexes and index columns in a database. You may get all the indexes for tables, views, and table valued functions by using the sys.indexes.

However, you can do so by executing the following statement to find out the indexes in a specific table.

List of Indexes from a database

Syntax:
EXEC sp_helpindex ‘[SCHEMA-NAME.TABLE-NAME]’
GO

Example:
EXEC sp_helpindex ‘dbo.Emp’
GO

Hope you find this article helpful.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s