Terminal Monitor Command Summary
After the Terminal Monitor starts, you must use its commands to execute queries and manipulate the contents of the query buffer.
Terminal Monitor commands are summarized here. For details, see the Terminal Monitor chapter of the SQL Reference Guide.
\ansistamp
Displays timestamps in ANSI format.
\a or \append
Appends to the query buffer.
\[no]bell
Includes or does not include a bell with the continue or go prompt.
\cd or \chdir dir_name
Changes the working directory of the monitor to the named directory.
\colformat column_name [column_format]
Defines a column name/format pair to be used in result sets.
\[no]continue
Continues or does not continue statement processing on error.
\date
Prints the current date and time.
\e or \ed or \edit or \editor [filename]
Invokes a text editor.
\eval or \v
Puts the result back into the macro workspace.
\g or \go
Processes the current query.
\i or \include or \read filename
Reads the named file into the query buffer.
\list or \l
Prints macros on the terminal.
\[no]macro
Enables (\macro) or disables (\nomacro) macro definition.
\[no]padding
Trims (\nopadding) space padding from column output or resets padding to the default.
\p or \print
Prints the current query.
\q or \quit
Exits the Terminal Monitor.
\r or \reset
Erases the query buffer.
\read filename
Reads the named file into the query buffer.
\[no]redir or \[no]redirect filename
Redirects row output to the specified file. All other output, such as errors and row counts, are sent to the terminal. \noredir disables redirected row output.
\[no]runtime or \[no]rt or \rt [block|statement]
Switches into "run time" mode, which prints the time taken (to six decimal places) to execute the SQL.
\s or \sh or \shell
Escapes to the operating system.
\script [filename]
Toggles between logging and not logging the session to a file.
\shell or \sh or \s [command] | [filename]
Escapes to the operating system.
\showcf
Displays all column name/format pairs defined with \colformat.
\[no]sil or \[no]silent
Turns on (\silent) or turns off (\nosilent) silent mode.
\[no]suppress
Suppresses or does not suppress the printing of the results returned from the query.
\time
Prints the current time and date.
\timestamp or \ts
Prints the current date and time to two decimal places.
\[no]titles
Turns on (\titles) or turns off (\notitles) column titles.
\[no]trim
Trims (\trim) space padding from column output; column titles are shown in full. \notrim resets padding to the default.
\vdelim or \vdelimiter char
Sets the column separator to the specified character.
\[no]vert or \[no]vertical
Enables or disables vertical output, in which each column is displayed one output row after another with a "table row" heading.
\w or \write filename
Writes the contents of the query buffer to the named file.