• skyline666 (9/10/2008)


    ALZDBA (9/10/2008)


    Keep in mind SSMS has some issues with e.g. char(13) resulting in a "syntax error near ...."

    And off course you'll need to have the default 'go' for batch separator in your ssms settings.

    Im sorry but no, that is not asked in the question. The question asks what that piece of code does, and the result is:

    Msg 102, Level 15, State 1, Line 1

    Incorrect syntax near 'GO'.

    I was going to choose the correct answer before I tested just to see what does happen, I should of done that as I would of got the answer "correct".

    In my case, it results in the batch run 10 times. I tested in my local instalation, with the default setting.

    Probably you have some kind of customization that changed the setting for default batch seperator?

    Example: If i change default separator to ";" got Msg 170, Level 15, State 1, Line 2

    Line 2: Incorrect syntax near 'GO'.