mysql如何查询出某个字段为null的数据

博主刚开始用的是

select * from product where sale_price =null

这样子查不出来,需要用到下面的sql

select * from product where sale_price is null

当然,如果想要查出来不是null的,

select * from product where sale_price is not null
发布了45 篇原创文章 · 获赞 0 · 访问量 1230

猜你喜欢

转载自blog.csdn.net/weixin_44853669/article/details/105077580
今日推荐