Saturday, July 23, 2011

Alter Table Drop Index Syntax


The SQL syntax for ALTER TABLE Dop Index is
ALTER TABLE "table_name"
DROP INDEX " INDEX_NAME "

Let's look at the example. Assuming our starting point is the "customer" table created in the CREATE TABLEsection:
Table customer
Column NameData Type
First_Namechar(50)
Last_Namechar(50)
Addresschar(50)
Citychar(50)
Countrychar(25)
Birth_Datedate

Assume we want to drop the index created in the ALTER TABLE ADD INDEX section. To do this, we type in the following:
ALTER table customer DOP INDEX IDX_COUNTRY;
Please note that using ALTER TABLE to drop an index is not supported in Oracle or SQL Server.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Deep's | Bloggerized by Deep - Deep's Templates | ElearSQL-Server