Mysql中查询字段为null或者不为null

在mysql中,查询某字段为空时,切记不可用 = null,
而是 is null,不为空则是 is not null
例如
delete from teacher where salary is null;
delete from teacher where salary is not null;

猜你喜欢

转载自blog.csdn.net/laoshaonian/article/details/47258911