Oracle一则诡异的程序
Jun 07, 2016 pm 05:45 PMfunction chkA_B return varchar2 as
a varchar2(10):=NULL;
b varchar2(10):='1';
begin
if a=b then
return 'Error';
end if;
return 'ok';
end;
这段程序诡异地返回ok,而不是Error. 通过跟踪,程序进入了 return 'error' .但是紧接着也执行了return 'ok'.
如果将if 的条件改为 if nvl(a,'0')=b 则程序正常。

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solution: Your organization requires you to change your PIN

How to adjust window border settings on Windows 11: Change color and size

How to change title bar color on Windows 11?

OOBELANGUAGE Error Problems in Windows 11/10 Repair

How to enable or disable taskbar thumbnail previews on Windows 11

10 Ways to Adjust Brightness on Windows 11

Solution to PHP Fatal error: Call to undefined method PDO::prepare() in
