1.不为空spa
select * from table where id <> "";.net
select * from table where id != "";blog
2.为空ip
select * from table where id ="";table
select * from table where isNull(id);select
具体状况具体分析,若是字段是char或者varchar类型的,使用id=""能够的;引用
若是字段是int类型的,使用isNull会好些。margin
引用:https://blog.csdn.net/yipiankongbai/article/details/11181151tab