牛客297995581号
牛客297995581号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客297995581号的博客
全部文章
/ 题解
(共40篇)
题解 | #查找后排序#
select device_id,age from user_profile order by age asc; // order by + 列名 asc/desc:根据那一列升序/降序
Mysql
2022-03-13
9
810
题解 | #操作符混合运用#
select device_id,gender,age,university,gpa from user_profile where gpa > 3.5 AND university = '山东大学' union ...
Mysql
2022-03-11
12
1670
题解 | #操作符混合运用#
select device_id,gender,age,university,gpa from user_profile where (gpa > 3.5 AND university = '山东大学') or ...
Mysql
2022-03-11
0
197
题解 | #Where in 和Not in#
select device_id,gender,age,university,gpa from user_profile where university in ('北京大学','复旦大学','山东大学'); //in/not in + (集合中存放列值)
Mysql
2022-03-11
0
220
题解 | #高级操作符练习(2)#
select device_id,gender,age,university,gpa from user_profile where university = '北京大学' or gpa > 3.7; //or: //一真则真,全假则假
Mysql
2022-03-11
0
243
题解 | #高级操作符练习(1)#
select device_id,gender,age,university,gpa from user_profile where gender = 'male' and gpa > 3.5; //and //全真则真...
Mysql
2022-03-11
0
328
题解 | #用where过滤空值练习#
select device_id,gender,age,university FROM user_profile WHERE age != '';//1.不为空1 WHERE age is not null;//2.不为空2
Mysql
2022-03-11
0
227
题解 | #查找除复旦大学的用户信息#
select device_id,gender,age,university FROM user_profile WHERE university not like '复旦大学';//1.模糊查询 列值中不含有复旦大学四个字儿 WHERE university...
Mysql
2022-03-11
46
404
题解 | #查找某个年龄段的用户信息#
SELECT device_id,gender,age FROM user_profile WHERE age BETWEEN 20 and 23; //注意:BETWEEN 20 and 23 是闭区间[20,23]。
Mysql
2022-03-11
0
274
题解 | #查询结果限制返回行数#
select device_id AS user_infos_example from user_profile LIMIT 2; //1.as 写不写都可 //2.别名加不加引号(单双)都可 //加引号:别名就是引号内的内容。 //不加引号:别名如果为小写,会解析为大写,别名实际为大写。 //...
Mysql
2022-03-10
71
1188
首页
上一页
1
2
3
4
下一页
末页