【问题标题】:Powershell Invoke-sqlcmd2 - Incorrect syntax near 'GO'Powershell Invoke-sqlcmd2 - 'GO' 附近的语法不正确
【发布时间】:2016-11-21 10:10:26
【问题描述】:

我收到Incorrect syntax near 'GO' 的语法错误。我尝试了几种方法,其中一种奏效了。谁能给我解释一下?

invoke-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"

【问题讨论】:

标签: powershell invoke-sqlcmd


【解决方案1】:

据我所知,您不需要“GO”命令。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-09-23
    • 2011-08-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多