题解 | #Where in 和Not in#

Where in 和Not in

http://www.nowcoder.com/practice/0355033fc2244cdaa09b2bd6e794c762

SELECT device_id,gender,age,university,gpa
from user_profile
where university  in (SELECT university
from user_profile
where university="北京大学" or university="复旦大学"
                     or university="山东大学");
全部评论
不用嵌套子查询,select device_id,gender,age,university,gpa from user_profile where (university="北京大学" or university="复旦大学" or university="山东大学");
点赞 回复 分享
发布于 2021-11-13 10:02
我这么写要是被组长知道了,他能让我工资减一半
点赞 回复 分享
发布于 2022-10-01 21:35 重庆

相关推荐

02-16 13:52
门头沟学院 Java
给🐭🐭个面试机会吧:嘿,mvbatis
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务