一般在項目中用法是(這種沒辦法顯示空值的數據):
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刪除。