If you enter a long command, you can make changes to this command at a later stage by editing the command buffer in an external file.
You have already executed a command.
...
1. To load the contents of the command buffer to an external file, enter the following command:
\e [<file>]
¡ Enter the complete file path and name <file>.
¡ If you do not specify a file, SQLCLI generates a temporary file.
The file is opened in an editor. To determine which editor will be used, the SQLCLI evaluates the environment variables SQLCLI_EDITOR, EDITOR and VISUAL in succession. If you have not set any of these environment variables, the Notepad editor is used in Microsoft Windows and the vi editor in Linux/Unix. For information on setting the environment variables, see your operating system documentation.
2. Make the desired changes in the file.
3. Save the file in the editor and close the file and editor.
You have changed the contents of the command buffer and can now execute the changed command with the command \g.
See also: