当前位置: 主机百科 » 资源 » 技术 » 正文

MySQL判断字段是否为Null

查询mysql数据库表中字段为null的记录:

1
  select * from 表名 where 字段名 is null

示例:

1
  select * from student where address is null

查询mysql数据库表中字段不为null的记录:

1
  select * from 表名 where 字段名 is not null

示例:

1
  select * from student where address is not null

未经允许不得转载:主机百科 » MySQL判断字段是否为Null

相关文章