oracle 空字符'' 和Null

Oracle 查詢

select * from user where user.id !='' or user.id != null

使用上述sql 查詢user表中沒有數據,

必須使用

select * from user where user.id is not null 纔有數據

原因:Oracle中‘’不大小,對於null只能用is null 或則 is not ull

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章