RosettaCodeData/Task/Conditional-structures/SQL/conditional-structures-2.sql

10 lines
188 B
MySQL
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
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'