码迷,mamicode.com
首页 > 其他好文 > 详细

关于null的判断

时间:2018-10-26 17:41:42      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:select   运算   java   statement   等于   color   ||   通过   var   

Java中【null】的判断:

1.【null】只能通过is null,is not null判断,任何与的 关系运算(比较,有大于、大于等于、小于、小于等于、等于、不等于六种运算)都是false。

解决的方法:if(【null】is not null and 【null】>=n)

 

declare
-- Local variables here
i integer;
v_platform number(10);
begin
-- Test statements here
SELECT null INTO v_platform FROM dual;
dbms_output.put_line(‘wwwww‘||v_platform);
if  v_platform<>19 then
dbms_output.put_line(‘wwwww‘);
end if;

end;

 

改进:

declare
-- Local variables here
i integer;
v_platform number(10);
begin
-- Test statements here
SELECT null INTO v_platform FROM dual;
dbms_output.put_line(‘wwwww‘||v_platform);
if v_platform is not null and v_platform<>19 then
dbms_output.put_line(‘wwwww‘);
end if;

end;

关于null的判断

标签:select   运算   java   statement   等于   color   ||   通过   var   

原文地址:https://www.cnblogs.com/shan-pj/p/9857351.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!