[SQL Server] Create index query for all tables |
Create index query for all tables Posted: 12 May 2013 02:50 PM PDT Dear AllI wan to to drop and recreate indexex on all tables using query.I have drop index syntax as followsSELECT 'drop index ' +i.name+ ' on ' +o.name FROM sys.indexes i JOIN sys.objects o ON i.object_id = o.object_idWHERE i.type_desc = 'NONCLUSTERED' AND o.type_desc = 'USER_TABLE'I would like to get the create index syntax using query. Can anybody help? |
You are subscribed to email updates from SQLServerCentral / SQL Server 2008 / SQL Server Newbies To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment