How do you check if a certain index exists in a table?

Posted by Lieven Cardoen on Stack Overflow See other posts from Stack Overflow or by Lieven Cardoen
Published on 2010-04-22T09:55:15Z Indexed on 2010/04/22 10:13 UTC
Read the original article Hit count: 120

Filed under:

Something like this:

SELECT
* 
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS 
WHERE CONSTRAINT_NAME ='FK_TreeNodesBinaryAssets_BinaryAssets'
and TABLE_NAME = 'TreeNodesBinaryAssets'

but for indexes.

© Stack Overflow or respective owner

Related posts about sql-server