how to run scripts with GO

wmezasoria posted 3 months ago in General

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 posted 3 months ago

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.