Created
November 18, 2015 16:57
-
-
Save mikaelweave/b292c0ef44d45932638d to your computer and use it in GitHub Desktop.
Drop Index if it already exists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF EXISTS(SELECT * FROM sys.indexes WHERE object_id = object_id('schema.tablename') AND NAME ='indexname') | |
DROP INDEX indexname ON SCHEMA.tablename; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment