SQL语句查询是否为空 =null及null
16lz
2022-01-17
a b c d
980515 精頂企業有限公司 簡家豪 NULL
980514 全欣木業有限公司 NULL 123
980514 迅億科技股份有限公司 簡逢浚 NULL
980515 聖越國際企業有限公司 NULL 111
表结构如上所示,要查询C列为空的记录的SQL语句不是select * from table where c=null; 或者 select * from table where c=''; 而应当是 select * from table where c is null; 相反地要查询不为空的则应当是 select * from talbe where c<>''; 或者 select * from table where c is not null; 注意:不是not is null哦。
更多相关文章
- Android(安卓)-- Android(安卓)JUint 与 Sqlite
- android 当系统存在多个Launcher时,如何设置开机自动进入默认的La
- Android(安卓)SQLiteDatabase的使用
- android 通话记录次数
- Android(安卓)SQLiteDatabase的使用
- android实现关键字搜索功能
- 我的android 第14天 - 使用SQLiteDatabase操作SQLite数据库
- Android(安卓)编码规范
- 新Android工程src和layout目录为空的问题