Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IF EXISTS (SELECT name FROM sys.indexes
- WHERE name = N'index_name'
- AND object_id = OBJECT_ID (N'schema.tableName'))
- DROP INDEX index_name
- ON schema.tableName
- GO
- CREATE NONCLUSTERED INDEX index_name
- ON schema.tableName (col1, col2)
- WHERE <filter-condition>
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement