SQL Server IF ELSE Statement By Examples
Second, the output IF statement check if @x is greater than zero. Because @x is set to 10, the condition (@x > 10) is true. Therefore, the nested IF statement executes. Finally, the nested IF statement check if @x is less than @y ( @x < @y). Because @y is set to 20, the condition (@x < @y) evaluates to true.
DA: 72 PA: 22 MOZ Rank: 68