Client side scripting
Overview
You can use special commands in the SQL Editor.
Info
These commands are executed on Team Edition's side, not on the server-side.
Supported commands
Team Edition supports the following commands:
General commands
Command | Description |
---|---|
@ai message |
Sends a natural-language message to the AI assistant. The AI processes the message and generates an appropriate SQL query or action based on your input. For more details, see AI command. |
@set var = value |
Sets a script variable. You can use expressions as a value. Variables can be used as SQL queries input parameters. For more information, see Dynamic parameter bindings. |
@unset var |
Unsets a script variable. |
@echo message |
Prints message to output log. You can use a macro in a message (for example ${var} ). |
@include fileName |
- Executes a specified file name, - Can be used in scripts, - Opens a new SQL console with the specified file and processes SQL queries as in a regular SQL editor. |
@export { ... } |
Opens the data transfer wizard with predefined settings. For more information, see Export command. |
@pause message |
Displays a message and waits for the user to press Enter. |
@accept var |
Reads user input and saves it into a variable. |
You can use multiline commands by enclosing them in @@
.
Example
@@set var = 'long multiline value' @@
Database-specific commands
MySQL
Command | Description |
---|---|
source fileName |
Executes a SQL script from a file in MySQL CLI syntax. For details, see MySQL documentation for source command. |
Exasol
Command | Description |
---|---|
define var = value |
Declares and assigns a variable in Exasol EXAPlus syntax. For details, see Exasol documentation for DEFINE . |
Oracle
Command | Description |
---|---|
Pause /Pau |
Displays a message and waits for the user to press Enter. Skips prompt if no text is provided. For details, see Oracle documentation for PAUSE command. |
Accept |
Reads user input and saves it into a variable. Supports datatypes, formats, defaults, prompts, and hidden input. For details, see Oracle documentation for ACCEPT command. |