Script to Drop Indexes for a Given Table

Here is a simple stored procedure that allows you to drop all user-created indexes for a given table. Sp_ Dropindexes takes a single parameter (@objname) and drops all of its user-created indexes. The procedue was created in and tested on SQL Server 2000.

Author: Sachin Wable

Download Script:
sp_dropindex.sql



Disclaimer:
We hope that the information on these script pages is
valuable to you. Your use of the information contained in these pages,
however, is at your sole risk. All information on these pages is provided
“as -is”, without any warranty, whether express or implied, of its accuracy,
completeness, or fitness for a particular purpose…

Disclaimer Continued

Back to Database Journal Home

Get the Free Newsletter!

Subscribe to Cloud Insider for top news, trends & analysis

Latest Articles