题解 | #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 ('北大','川大','复旦');

全部评论

相关推荐

那一天的Java_J...:他本来公司就是做这个的,不就是正常的游戏客户端和服务器开发,软硬件联动,有啥恶心不恶心的,提前告诉你就是怕你接受不了,接受不了就没必要再往后走流程浪费时间,虽然这公司是一坨。
点赞 评论 收藏
分享
湫湫湫不会java:1.在校经历全删了2.。这些荣誉其实也没啥用只能说,要的是好的开发者不是好好学生3.项目五六点就行了,一个亮点一俩行,xxx技术解决,xxx问题带来xxx提升。第一页学历不行,然后啥有价值的信息也没有,到第二页看到项目了,第一个项目九点,第二个项目像凑数的俩点。总体给人又臭又长,一起加油吧兄弟
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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