Supported SQLCMD Syntax
Query editor supports the following SQLCMD script keywords:
[!!:]GO[count]
!!
:exit(statement)
:Quit
:r
:setvar
:connect server[\instance] [-l login_timeout] [-U user [-P password]]
:on error [ignore|exit]
:error
:out
Note:
For both :error and :out, stderr and stdout send output to the messages tab.
SQLCMD commands not listed above are not supported in Query Editor. When a script containing SQLCMD keywords that are not supported is executed, the Query Editor will send an “Ignoring command
Caution:
Because you are not starting SQLCMD from the command line, there are some limitations when running Query Editor in SQLCMD Mode. You cannot pass in command-line parameters such as variables, and, because the Query Editor does not have the ability to respond to operating system prompts, you must be careful not to execute interactive statements.