MySQL allows to drop existing INDEXES and PRIMARY KEYs.  For this MySQL provides ALTER TABLE and DROP statements. You can use ALTER TABLE statement to drop "normal" or "unique" indexes.

Syntax to drop an index by ALTER TABLE statement is like below:

ALTER TABLE tablename DROP INDEX index_name;

Take an example to drop an existing index:

ALTER TABLE buyers DROP INDEX fname_index;

To drop a primary key via ALTER TABLE syntax would be like below:

ALTER TABLE tablename DROP PRIMARY KEY;

Take an example to drop primary key:

ALTER TABLE buyers DROP PRIMARY KEY;

Posted in: MySQL

Related FAQ's

Marius Ion ANGEL HOT SOFT LLC (800) 316-7677