题解 | #用where过滤空值练习#

用where过滤空值练习

https://www.nowcoder.com/practice/08c9846a423540319eea4be44e339e35

select device_id,gender,age,university 
from user_profile 
where age is not null and age <>''

这里看了评论区一个大佬的写法,在sql中,null和空字符串不是一个,但是在实际中,我们这两个值如果不要null,那也必须排除空字符串。

全部评论

相关推荐

点赞 评论 收藏
分享
11-03 14:57
西北大学 营销
Belltrix:其实就是每根转动一定的角度
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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