Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. IF EXISTS (SELECT name FROM sys.indexes
  2. WHERE name = N'index_name'
  3. AND object_id = OBJECT_ID (N'schema.tableName'))
  4. DROP INDEX index_name
  5. ON schema.tableName
  6. GO
  7.  
  8. CREATE NONCLUSTERED INDEX index_name
  9. ON schema.tableName (col1, col2)
  10. WHERE <filter-condition>
  11. GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement