首页 > 数据库技术 > 详细

mysql中查询字段为null或者不为null的sql语句怎么写?

时间:2018-11-24 17:39:37      阅读:250      评论:0      收藏:0      [点我收藏+]

在mysql中,查询某字段为空时,切记不可用 = null,
而是 is null,不为空则是 is not null

select * from table where column is null;

select * from table where column is not null;

select * from s_class_log WHERE class_uuid="50f3b8ecde184f22ac6bd7304b388b60" AND course_schedules_uuid="940991bff18d4122a4a6471b61ef18f2" and  remark_status is not null

mysql中查询字段为null或者不为null的sql语句怎么写?

原文:https://www.cnblogs.com/sonder/p/10012678.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!