数据库中的空字符串和null

来源:互联网 发布:图片素材 知乎 编辑:程序博客网 时间:2024/04/30 03:53

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;