RosettaCodeData/Task/Conditional-structures/SQL/conditional-structures-2.sql
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

9 lines
188 B
Transact-SQL

declare @n int
set @n=123
if @n=123
BEGIN --begin/end needed if more than one statement inside
print 'one two three'
END
ELSE
if @n=124 print 'one two four'
else print 'other'