开发者

populate pl/SQLvariable

I have the following

if hero.name != lastManStanding then
    dbms_output.put(hero.name);
    lastManStanding := hero.name;
end if;

where

开发者_如何转开发
lastManStanding hero.name%type;

However the if block never gets execute. What am I doing wrong?


If lastManStanding is null, the condition will never evaluate to true. Such is the case with NULL.

Change it to:

if hero.name != nvl(lastManStanding, 'xxxxxx') then
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜