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
精彩评论