Why does this work in SQL Server? (@counter +++++ + 1)

Why is this type of work in SSMS and does not cause errors or errors at runtime?

DECLARE @counter integer SET @counter = 42 WHILE @counter < 52 BEGIN set @counter = @counter++++++++ + 1 PRINT 'The counter is ' + cast(@counter as char) END 
+6
source share

All Articles