6

Why does this kind-of work in SSMS and does not produce a squiggle or a run-time error?

DECLARE @counter  integer
SET @counter = 42
WHILE @counter < 52
BEGIN 
    set @counter = @counter++++++++  + 1
    PRINT 'The counter is ' + cast(@counter as char) 
END
Felix Pamittan
  • 31,544
  • 7
  • 41
  • 67
Alex Motz
  • 61
  • 2

0 Answers0