27. Manage macros with SQL Workbench/J command
Prev |  | Next

## 27. Manage macros with SQL Workbench/J command

All SQL Workbench/J specific command can only be used from within SQL Workbench/J

### 27.1. Define a new macro - WbDefineMacro

Defines a new macro (or overwrites an existing one). This command is primarily intended for the console mode

Parameter | Description
--- | ---
-name | The name of the new macro
-group | The name of the macro group in which the new macro should be stored
-text | The text of the macro
-file | A file from which to read the macro text. If this parameter is supplied, `-text` is ignored
-encoding | The encoding of the input file specified with the `-file` parameter.
-autoExpand | If `true` then the new macro is a macro that is expanded while typing

### 27.2. Delete a macro - WbDeleteMacro

`WbDeleteMacro` is used to delete a macro, the macro name is passed with the command, e.g:

    WbDeleteMacro showData

### 27.3. List available macros - WbListMacros

Display the defined macros. This command is primarily intended for the console mode.

Prev |  | Next
26. Show information about database objects | Home | 28. Manage variables with SQL Workbench/J