Something like this:
SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_NAME ='FK_TreeNodesBinaryAssets_BinaryAssets' and TABLE_NAME = 'TreeNodesBinaryAssets'
but for indexes.
You can do it using a straight forward select like this:
SELECT * FROM sys.indexes WHERE name='YourIndexName' AND object_id = OBJECT_ID('Schema.YourTableName')
2.1m questions
2.1m answers
60 comments
57.0k users