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

10 lines
188 B
MySQL
Raw Permalink Normal View History

2023-07-01 11:58:00 -04: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'