Presents your SQL SERVER E-NEWSLETTER for April 10, 2003 <-------------------------------------------> GET INDEX INFORMATION FAST WITH SP_HELPINDEX SQL Server 2000 stored procedure, sp_helpindex, provides information about indexes on a table or a view. The sp_helpindex procedure requires only the table or view name as an argument. In addition, its execute permission defaults to the public role, making it easily accessible. The stored procedure will return the index name, the index description, and the keys on which the index is built. Ascending indexed columns are the default and are listed by name. Descending columns are listed in the result set with a minus sign following their name. In this example, we'll query information about the authors table in the pubs database. Use pubs sp_helpindex 'authors' The query returns the following result set: index_name index_description index_keys ----------- -------------------------------- ------------------ Aunmind nonclustered located on PRIMARY au_lname, au_fname UPKCL_auidind clustered, unique, primary key located on PRIMARY au_id In this case, the query returns two indexes on the authors table, a clustered and a nonclustered index. Your results may be slightly different depending on the indexes on your authors table. ----------------------------------------