欢迎DaLao指导

博客名称

你的一句话介绍

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

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

 

posted @ 2016-06-14 09:22  麻辣咸鱼  阅读(5056)  评论(0编辑  收藏  举报