• Stephen is correct. The semicolon is a command seperator; GO is a batch seperator.

    Though the semicolon is completely optional in SQL Server 2000, this changes in SQL Server 2005. In some cases (especially before a CTE), using a semicolon is required.

    Best, Hugo


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/