O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Dropping Indexes

You can drop indexes by using T-SQL or via tools in the SSMS. To drop indexes with T-SQL, you use the DROP INDEX command, a simple example of which follows:

DROP INDEX [IX_WorkOrder_ScrapReasonID] ON [Production].[WorkOrder]

This command drops the index named IX_WorkOrder_ScrapReasonID on the Production.WorkOrder table.

Using the Object Explorer in SSMS is the simplest alternative for dropping indexes. In the Object Explorer, you simply right-click the index you want to drop and then select Delete. The same execution options available for adding and modifying indexes are also available after you select Delete. This includes the option to script the T-SQL statements like that shown in the preceding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required