Home  >  Article  >  Database  >  What is the sql statement to delete an index?

What is the sql statement to delete an index?

王林
王林Original
2020-05-13 11:17:1310250browse

What is the sql statement to delete an index?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn