题解 | #查找某个年龄段的用户信息#

查找某个年龄段的用户信息

https://www.nowcoder.com/practice/be54223075cc43ceb20e4ce8a8e3e340

# select device_id, gender, age 
# from user_profile
# where age between 20 and 23;

select device_id, gender, age
from user_profile
where age >= 20 and age <= 23;

方法1: 通过 between and 实现范围查找,需要注意范围包含端点值

方法2: 通过 比较运算 + 逻辑连接词 and 来实现多个条件同时成立逻辑

全部评论

相关推荐

06-23 11:28
门头沟学院 Java
牛客91966197...:也有可能是点拒绝的时候自动弹的话术
点赞 评论 收藏
分享
醉蟀:你不干有的是人干
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
06-26 14:50
人力小鱼姐:有后面墨迹那两句的时间问题早回答完了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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