![]() | |
All SQL Workbench/J specific command can only be used from within SQL Workbench/J |
More details about using variables can be found in the chapter Variable substitution.
This defines an internal variable which is used for variable substitution during SQL execution.
There are two possibilities to define a variable.
The short syntax is: WbVarDef variable=value
The long syntax allows to define variables in a different way:
Parameter | Description |
---|---|
-variable | The name of the variable to be defined. |
-value | The value of the variable. |
-file | Read the variable definitions from the specified file. |
-contentFile | Read the contents of the variable from a the specified file. |
-values | Define a comma separated list of values that are used in the dialog that is shown when prompting for variable values. |
More details and examples can be found in the chapter: Variable substitution
This removes a variable.
The syntax is WbVarDelete variable
variable
is the name of the variable to be removed.
The name can contain wildcards. WbVarDelete *
will remove all defined variables.
WbVarDelete id*
will remove all variables starting with id
.
This shows all defined variables when invoked without parameters. There are two ways to filter the result:
Supplying a simple wildcard value, e.g. WbVarList foo*
to display variables where the name starts with foo
Using the parameter -match
to define a regular expression only show variables where the name matches the regular expression,
e.g. WbVarList -match="^(foo|bar).*"
to list all variables where the name starts with foo
or bar
.