Delete index
drop index [indexname] on mytable;
Create index
alter table tbl_name add primary key (column_list):
This statement Add a primary key, which means the index value must be unique and cannot be null.
alter table tbl_name add unique index_name (column_list):
The value of the index created by this statement must be unique (except null, which may appear multiple times).
alter table tbl_name add index index_name (column_list):
Add a normal index, the index value can appear multiple times.
alter table tbl_name add fulltext index_name (column_list):
This statement specifies the index as fulltext, which is used for full-text indexing.
The above is the detailed content of What is the sql statement to delete an index?. For more information, please follow other related articles on the PHP Chinese website!