题解 | #创建索引#

创建索引

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

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);

索引的创建

1、普通索引

create index index_name on table_name (column1[asc|desc , column2[asc|desc] , ......)

或者

alter table table_name

add index index_name (column1[asc|desc , column2[asc|desc] , ......)

2、创建唯一索引

create unique index index_name on table_name (column1[asc|desc , column2[asc|desc] , ......)

或者

alter table table_name

add unique index index_name (column1[asc|desc , column2[asc|desc] , ......)

3、创建全文索引

create fulltext index index_name on table_name (column1[asc|desc , column2[asc|desc] , ......)

全部评论

相关推荐

牛客小菜鸡66:boss里面,招人的叫老板,找工作的叫牛人
点赞 评论 收藏
分享
爱吃烤肠的牛油最喜欢...:50K是ssp了估计,ssp的人家多厉害都不用说,每年比例大概在百分之5左右
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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