首页 > 其他 > 详细

关于null的判断

时间:2018-10-26 17:23:44      阅读:85      评论:0      收藏:0      [点我收藏+]

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的判断

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

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