一般在项目中用法是(这种没办法显示空值的数据):

select * from 表 where 字段 like %aaa%;

 

解决空值不显示(除了显示的数据外,空值数据也可以显示):

select * from 表 where 字段 like %aaa% or 字段 is null;

注意:其中 字段 is null  必须要用is  null  不能写成 字段=null

 

相关文章: