Skip to content

ELSE

DECLARE @num INT = 10;
IF @num > 15
PRINT 'The number is more than 15'
ELSE
PRINT 'The number is not more than 15';
The number is not more than 15

The given conditional code first checks if @num is greater than 15. Since @num is 10, the condition evaluates to false. Consequently, the control flows to the ELSE part of the statement, and the phrase ‘The number is not more than 15’ is printed as the output.