2011-01-04 5 views
0

私が持っている以下の移入PL/SQLvariable

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

どこ

lastManStanding hero.name%type; 

かのブロックが実行を取得しませんが

。私は間違って何をしていますか?

答えて

0

lastManStandingがnullの場合、条件はtrueに評価されません。 NULLの場合がそうです。

に変更し、それを:

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