mysql不等于null和等于null的写法

1.表结构 

2.表数据

 3.查询teacher_name字段不能等于空并且也不能等于空字符

SELECT * FROM sys_teacher WHERE teacher_name IS NOT NULL AND teacher_name <>''

查询结果:

4.查询teacher_name字段等于null或等于空字符

SELECT * FROM sys_teacher WHERE teacher_name = '' OR teacher_name IS NULL

查询结果:

 

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 精致技术 设计师:CSDN官方博客 返回首页