You can find out if the index exists for a table by querying the sys.indexes table as shown in this blog post’s code sample.
How do you check if an index exists in a table?
Use AdventureWorks2014 GO SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID('HumanResources.Employee')
This will list out all the indexes of the table.
![image How do you check if an index exists in a table?](https://abundantcode.com/wp-content/uploads/2016/09/image_thumb-8.png)
Leave a Reply