Alan Moseley IT Consultancy

Blog Entry

2/9/2009 - List all indexes for a table in SQL

Whilst trying to resolve performance issues on an SQL database, I needed to get a list of all indexes for a table. To do this, open the SQL Query Analyzer and type the following in the query window:-

use databasename
EXEC sp_helpindex 'tablename'

Now click the execute button. You should now see a list of all indexes.