About 34,000 results
Open links in new tab
  1. t sql - What is the use of GO in SQL Server Management Studio ...

    The GO command is used to group SQL commands into batches which are sent to the server together. The commands included in the batch, that is, the set of commands since the last GO command or …

  2. Use of Begin / End Blocks and the Go keyword in SQL Server?

    Apr 25, 2023 · Imagine you are entering in SQL statements on the command line. You don't necessarily want the thing to execute every time you end a statement, so SQL Server does nothing until you …

  3. The real function of the "GO" Statement in SQL? - Stack Overflow

    May 10, 2019 · I heard that GO statement separates the command batches in SQL. And the CREATE transaction should be the only query on a batch. But when i try: Create database dbTest Create table …

  4. sql server - Incorrect syntax near 'GO' - Stack Overflow

    The GO keyword is not T-SQL, but a SQL Server Management Studio artifact that allows you to separate the execution of a script file in multiple batches.I.e. when you run a T-SQL script file in …

  5. sql - Is there a way to persist a variable across a go ... - Stack Overflow

    And there's no way to qualify the table names with the database name in a variable like that. With his previous question about using a variable with the USE statement, I'm guessing he's going to need to …

  6. What is the difference between ";" and "GO" in T-SQL?

    Oct 4, 2009 · I use ADO.NET as well as the sqlcmd utility to send SQL scripts to SQL Server 2008. What is the difference between using ; and GO to separate chunks of SQL?

  7. In SQL Server, when should you use GO and when should you use semi ...

    Sep 13, 2010 · GO is a batch terminator, a semi-colon is a statement terminator. you will use GO when you want to have multiple create proc statements in 1 script because create proc has to be the first …

  8. sql - Should we end stored procedures with the GO statement? - Stack ...

    Should we end stored procedures with GO statement, if so what are the advantages of using GO? CREATE PROCEDURE uspGetAddress @City nvarchar(30) AS SELECT * FROM …

  9. What is the difference between ; and GO in stored procedure in SQL ...

    The semicolon separates queries, the GO command separates batches. (Also GO is not a T-SQL command, it's a command recognised by the sqlcmd and osql utilities and Management Studio.) You …

  10. Execute a large SQL script (with GO commands) - Stack Overflow

    I need to execute a large set of SQL statements (creating a bunch of tables, views and stored procedures) from within a C# program. These statements need to be separated by GO statements, …