• What happens seems to depend on the SQL Client/Options in use, rather than which version of SQL is at the back end.

    The script executes 10 times if I run it in Management Studio, but...

    When I run it in Query Analyser (against a SQL 2005 instance), I get an error:-

    Server: Msg 102, Level 15, State 1, Line 2

    Incorrect syntax near 'GO'.