How to get
the list of all existing indexes of a table:
There is a system stored procedure “sp_helpindex”, which can be used to get the list of all existing indexes by supplying table name to it. We can use this stored procedure as -
|
Let's see it by practical. I am creating a table with 3 indexes on it. I am creating 2 indexes while creating my table tblTestAKumar and later adding 1 index using CREATE INDEX command. By default CREATE INDEX command is going to add a Non-Clustered index to my table.
|
We will add a one more index on LastUpdatedOn column using below command as-
|
Now we will execute system stored procedure ”sp_helpindex” by supplying our table as –
|
This gives us following result:


Anil KumarPosted Jun 5, 2012, 12:21 PM
Thanks
Lajapathy ArunPosted Jun 5, 2012, 5:24 AM
Good one