Index usage in MySQL

One, create an index

  Use the alter table statement to create an index: applicable to database tables that have been created

ALTER TABLE 表名 ADD 索引类型 (unique,primary key,fulltext,index)[索引名](字段名)

 

Two, delete the index

  Delete index

drop index 索引名 on 表名;

  Example: 

drop INDEX index_tax_vou_no ON tb_tax_calim2;

 

Three, view the index

  View index

show index from table_name;
示例:查看 "user" 表的索引
show index from user;

 

Guess you like

Origin blog.csdn.net/y_bccl27/article/details/114581709