题解 | #Where in 和Not in#

Where in 和Not in

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

select device_id,gender,age,university,gpa from user_profile
    where university in('北京大学','复旦大学','山东大学')

where字句中可以使用:

  1. 比较运算符:> >= < <= <> !=
  2. between 80 and 100——值在80到100之间
  3. in(80,90,100)——值是80或90或100
  4. like 'e%' 通配符可以是%或_, %表示任意多字符 _表示一个字符
  5. 逻辑运算符:在多个条件直接可以使用逻辑运算符 and or not

关键字IN集合查询:

select device_id,gender,age,university,gpa from user_profile where university='北大' or university='川大' or university='复旦';

select device_id,gender,age,university,gpa from user_profile where university in ('北大','川大','复旦');

全部评论

相关推荐

不愿透露姓名的神秘牛友
07-24 13:39
在记录秋招的大魔王很...:别被忽悠了,我做了多年销售。我可以告诉你,这就是忽悠你的,销售一定要看底薪也要看提成两者不可缺一。提成是有业绩的时候才拿的到的,谁能保证一直有单状态都好。销售有时候很讲究运气的。底薪是你这个人这个岗位日常工作体现的价值。别小看底薪,你看那些跳槽去做经理主管的,底薪底一些,人家愿意去吗?所以那些说销售靠提成的纯属忽悠,除非他们的业务很容易成单。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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