--关于null在oracle数据库中是否参与计算,进行验证,

--关于null在oracle数据库中是否参与计算,进行验证,
with td as (
select null id,1 name from dual
),
td1 as
(
select null id,2 name from dual )

select * from td, td1 where nvl(td.id,'0.00') = '0'

select '1'||'0.1' from dual
number
number -> char
select to_char(3333.00,'999,999,009.00') from dual
to_char ;
to_date ;
to_number ;
3333.00
select to_char(3.00,'fm9990999') from dual
jsp ####,000
partten = '#################0000'
3
03
select nvl(null,0.00) from dual ;
null 不参与计算

= 来比较时, 两边类型不一样,就向下转型
select sysdate from dual where 0 = 0 ;
select sysdate from dual where '0' = '0' ;
number ---char
char --number

nvl(td1.id,0);
null bu cnayu jis
group by
select sum(id) from td;
1
select 1+null from dual
null 不参与计算

上一篇:查找Oracle数据库中的重复记录


下一篇:ios 绘制wav波形图