创建索引利用create index
create [unique|fulltext|spatial] index index_name [using index_type] on tbl_name (index_col_name,...) index_col_name: col_name [(length)] [asc | desc]
删除索引利用drop index
drop index 索引名
好了下面我们先来看一款创建索引的简单实例
create index part_of_name on customer (name(10));
删除索引
drop index part_of_name on customer (name(10));
其中有一个全文索引fulltext索引只能对char, varchar和text列编制索引,并且只能在myisam表中编制
时间: 2024-09-25 07:07:55