I posted this to microsoft.public.sqlserver.programming, but no one
could answer my question. So I think it is a good place to re-post my
question here.
My question:
I found that if you do not include any effective SQL statement between
BEGIN/END block, SQL Server 2000 Query Analyzer will think it is an
error:
Server: Msg 156, Level 15, State 1, Line 6
Incorrect syntax near the keyword 'end'.
if 1=1
select getdate()
else
begin
--select 'ok'
end
Is this behavior a SQL standard or simply a M$ standard glitch?