您的位置:首页 > 数据库 > MySQL

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

2018-01-05 11:35 323 查看
mysql中查询字段为null或者不为null

 
在mysql中,查询某字段为空时,切记不可用 = null,
而是 is null,不为空则是 is not null
  www.2cto.com  
select * from table where column is null;
 
select * from table where column is not null;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: