cxone
cxone
全部文章
分类
题解(9)
归档
标签
去牛客网
登录
/
注册
cxone的博客
全部文章
(共26篇)
题解 | #查看学校名称中含北京的用户#字符匹配包含,个数,某个字符范围
select device_id,age,university from user_profile WHERE university like '%北京%' 匹配串中可包含如下四种通配符: _:匹配任意一个字符; %:匹配0个或多个字符; [ ]:匹配[ ]中的任意一个字符(若要比较的字符是连续的,...
Mysql
2022-01-02
17
906
题解 | #Where in 和Not in#多解 or in
--43ms SELECT device_id,gender,age,university,gpa from user_profile where university='北京大学' or university='复旦大学' or university='山东大学' --43ms SELECT de...
Mysql
2022-01-02
0
374
题解 | #查找除复旦大学的用户信息#多解
结果 -- 42s select device_id,gender,age,university from user_profile where university !='复旦大学' -- 45s select device_id,gender,age,university from user_...
Mysql
2022-01-02
0
449
题解 | #查找某个年龄段的用户信息#
select device_id,gender,age from user_profile where age>=20 and age<=23 select device_id,gender,age from user_profile age between 20 and 23
Mysql
2022-01-02
7
945
题解 | #查询结果限制返回行数#
select device_id from user_profile limit 0,2---运行效率更高 select device_id from user_profile limit 2 ---运行效率低 也可结合 limit offset: 一起使用时,limit表示要取的数量,offset...
Mysql
2022-01-02
1
300
题解 | #查询多列#
选择具体多列即可 select device_id,gender,age,university from user_profile drop table if exists user_profile; CREATE TABLE user_profile ( id int NOT NULL, dev...
Mysql
2022-01-02
0
946
首页
上一页
1
2
3
下一页
末页