2016-11-21 68 views
1

我得到Incorrect syntax near 'GO'的语法错误。我尝试了一些方法,其中一个工作。任何人都可以向我解释?Powershell Invoke-sqlcmd2 - 'GO'附近的语法错误

来源为调用-sqlcmd2:https://github.com/RamblingCookieMonster/PowerShell/blob/master/Invoke-Sqlcmd2.ps1

任职:

Invoke-Sqlcmd2 -Query "SELECT 1 FROM TableA GO" 

没有工作:

Invoke-Sqlcmd2 -Query "Print 123 GO" 
+2

[GO'附近语法错误]的可能重复(http://stackoverflow.com/questions/25680812/incorrect-syntax-near-go) –

回答