Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic recreation of index keys?
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00663430
Message ID:
00663516
Views:
16
Look at sp_HelpIndex - you can insert the results of this call into a temporary table, drop each index in the temp table and then rebuild.

The only thing this doesn't give you is what to build the index on - probably in one of the sys tables.

Another option would be to script the indexes and execute the sql file somehow.

>I know how to do this in VFP, but is there a similar approach in SQL Server?
>
>I'd like to drop all indexes (or is it indices?) including the PK from a table, do some maintenance and the recrate the indexes.
>
>TIA
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform