@varname, :varname, ?varname (e.g.) SELECT * FROM TABLE WHERE COL1=@varname
(Specifying a fixed variable) :setvar <varname> "value" (Specifying a dynamic variable) :setvar <varname> (Using a variable) $(varname) e.g. :setvar FixedVar "%e%" :setvar DynamicVar SELECT * FROM [Categories] WHERE [CategoryName] LIKE '$(FixedVar)' AND [CategoryID]=$(DynamicVar)
You can separate multiple SQL statements by the word "GO", the symbol "/" or "Custom delimiter". e.g. CREATE TABLE a1 (cola1 int NOT NULL PRIMARY KEY) GO DROP TABLE a1 GO e.g. CREATE TABLE a1 (cola1 int NOT NULL PRIMARY KEY) / DROP TABLE a1 / e.g. DELIMITER $$ CREATE TABLE a1 (cola1 int NOT NULL PRIMARY KEY) $$ DROP TABLE a1 $$ e.g. SET TERM ^ CREATE TABLE a1 (cola1 int NOT NULL PRIMARY KEY) ^ DROP TABLE a1 ^