數據庫中的空字符串和null

oracle把字符串和nul等同對待l

insert into dy_test (id,name) values ('','dongyuan');

insert into dy_test (id,name) values (null,'dongyuan');

用下面的查詢語句,以上兩條數據都會顯示

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