一般在项目中用法是(这种没办法显示空值的数据):
select * from 表 where 字段 like %aaa%;
解决空值不显示(除了显示的数据外,空值数据也可以显示):
select * from 表 where 字段 like %aaa% or 字段 is null;
注意:其中 字段 is null 必须要用is null 不能写成 字段=null
一般在项目中用法是(这种没办法显示空值的数据):
select * from 表 where 字段 like %aaa%;
解决空值不显示(除了显示的数据外,空值数据也可以显示):
select * from 表 where 字段 like %aaa% or 字段 is null;
注意:其中 字段 is null 必须要用is null 不能写成 字段=null
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。