首页 > 数据库技术 > 详细

在oracle表中插入空字段和null测试

时间:2016-06-14 10:15:06      阅读:237      评论:0      收藏:0      [点我收藏+]
create table testTable
(
id number,
name varchar2(100)
)
select * from testTable
insert into testTable(id,name) values(1,user1)
insert into testTable(id,name) values(2,‘‘)
insert into testTable(id,name) values(3,null)

select count(id)  from testTable t where t.name=‘‘

select count(id)  from testTable t where t.name is null or t.name!=‘‘


select id,nvl(name,null) from testTable

select  id,nullif(name,1231231) from testTable





drop table testTable

 

在oracle表中插入空字段和null测试

原文:http://www.cnblogs.com/AmatVictorialCuram/p/5582841.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!