We have a sample table in our database which has a primary key. Let us check the indexes present in the table. Run the following query to check the index present in the table.
- sp_helpindexstudent

Let us create another index on a table.
- CREATE INDEX In NameON Student(Name)
- sp_index‘tablename’
- sp_helpindexstudent

We can see that the new index created is present in the above result set. Let us now see how to delete the index we just created.
Syntax for deleting an Index
DROP INDEX <table name>.<index name>
Let us now delete the index that we just created. Execute the following script.
- DROP INDEX student.InName

Let us run the query again just to verify there is no index present in the table.
- sp_helpindexstudent

As we can see the index created in the table is deleted.

Join the conversation! Your thoughts help the community grow.