在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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM