标签:多个 sql student 字符创 唯一索引 create dex index table
MySQL创建和删除索引创建普通索引:
alter table student add index index_dept(dept(8));
创建唯一索引
create unique index uni_ind_name on student (name);
根据列的前n个字符创建索引
create index index_dept on student(dept(8));
根据多个列创建联合索引
create index ind_name_dept on student(name,dept);
根据多个列的前n个字符创建联合索引
create index ind_name_dept on student (name(8), dept(10));
删除普通索引
alter table student drop index index_dept;
drop index index_dept on student;
标签:多个 sql student 字符创 唯一索引 create dex index table
原文地址:http://blog.51cto.com/accole/2344550