• Got it wrong , read the answer/explanation, didn't really believe it, so tried it in Query Analyser which gave the answer stated as the solution. But I still don't understand why ...

    My step-by-step interpretation was the same as Phillipe's. And Query Analyser's own code-formatting algorithm takes the same view:the PRINT statements for 1,4,5,7 and 8 appear dark blue ( non-commented) while the statements for 2,3 and 6 appear light blue (commented).