how to run scripts with GO

wmezasoria's profile image wmezasoria posted 6 years ago in General Permalink

when i try to run this:

USE [BADALEX1] GO

BEGIN TRAN

i get

/ Error de SQL (102): Sintaxis incorrecta cerca de 'GO'. /

any help

ansgar's profile image ansgar posted 6 years ago Permalink

That GO statement is a feature of MS SQL Studio, and HeidiSQL does not support it. Probably other clients as well.

From https://docs.microsoft.com/en-US/sql/t-sql/language-elements/sql-server-utilities-statements-go?view=sql-server-2017 :

GO is not a Transact-SQL statement; it is a command recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code editor.

Please login to leave a reply, or register at first.