题解 | #创建索引#

创建索引

https://www.nowcoder.com/practice/f2ea9ccf33c740d58576608940981807

本题考查各类索引的创建或是添加方式,主要有两种:
一是使用create index indexname on tablename(columnname(length)) 的方式:
create index idx_duration on examination_info(duration);   //  普通索引
create unique index uniq_idx_exam_id on examination_info(exam_id);   //  唯一索引
create fulltext index full_idx_tag on examination_info(tag);   //   全文索引
另一种是使用alter table tablename add index INDEXNAME(columnname) 的方式
alter table examination_info add INDEX idx_duration(duration),   //  普通索引
                add UNIQUE INDEX uniq_idx_exam_id(exam_id),   //   唯一索引
                 add FULLTEXT INDEX full_idx_tag(tag);   //   全文索引


全部评论

相关推荐

10-27 02:29
已编辑
门头沟学院 嵌入式工程师
牛客72783561...:简历不是这么写的,你这两个项目只说了用到了什么技术,却没说取得了什么成果,在我看来这就是你自己做的一个demo,没有价值。你为什么不写你电赛国二的那个项目?
点赞 评论 收藏
分享
迷茫的大四🐶:能不能好好排个版,谁会看这么长的简历啊,说明书吗
校招求职吐槽
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务