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

在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

猜你喜欢

转载自www.cnblogs.com/sonder/p/10012678.html