High on SQL!!!

Sep 13
### Create Non-Cluster Index on multiple columns

There was a requiremnet to create Non-Cluster Index on multiple  columns in 200 tables!!! Crazyyyy!!! Isn't it????

!!! Even 1000 (One Thousands) tables i don't care !!!

Can we automate this process dynmically using SQLCMD &  T-SQL?

***Yes---We Can***

SELECT ' CREATE NONCLUSTERED INDEX [ NIDX_' + SYSCOLUMNS.NAME + '] ON ' + SYSOBJECTS.NAME + .............................GO

---To get the complete code please Contact Me

Cheers,

Zahid

 

 

 

Comments

There are no comments for this post.