Mysql创建和删除索引 创建普通索引:alter table student add index index_dept(dept(8)); 创建唯一索引create unique index uni_in
创建普通索引:
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;
--结束END--
本文标题: MySQL index
本文链接: https://www.lsjlt.com/news/50773.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0