创建索引

创建索引:

create index 索引名称 on 表名(字段列表)            普通索引  ->什么字段都可以

create index 索引名称 on 表名(字段列表)

create unique index 索引名称 on 表名(字段列表)     创建唯一索引  ->字段必须唯一

alter table 表名 add primary key(字段名)        创建主键索引

 联合主键:

 

alter table 表名 add fulltext index               创建全文索引(不支持中文)

sphinx corseek 中文分词索引  

 

https://blog.csdn.net/tsuliuchao/article/details/4877157

posted @ 2018-07-16 15:05  super久违  阅读(144)  评论(0编辑  收藏  举报