mysql 索引创建与删除代码
创建索引利用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表中编制
- 上一篇:改变mysql数据库存储路径方法
- 下一篇:mysql 数据库创建与删除实例