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

What is the sql statement to delete an index?

王林
Release: 2020-05-13 11:17:13
Original
10323 people have browsed it

What is the sql statement to delete an index?

Delete index

drop index [indexname] on mytable;
Copy after login

Create index

alter table tbl_name add primary key (column_list):
Copy after login

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):
Copy after login

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):
Copy after login

Add a normal index, the index value can appear multiple times.

alter table tbl_name add fulltext index_name (column_list):
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template