Why the if then statement is not working here
declare @num integer(2);
set @num = 10;
begin
if (@num < 10)
Then
print('hello');
set @num = @num +1 ;
else
print('over');
set @num = @num +1 ;
END IF;
END;
I get these errors:
Msg 156, Level 15, State 1, Line 9
Incorrect syntax near the keyword 'Then'.Msg 102, Level 15, State 1, Line 12
Incorrect syntax near the keyword 'else'.