Name

SET CMDSEP

Synopsis

The CMDSEP setting controls whether you can enter multiple commands on one line. Both commands in question must be SQL*Plus commands. SET CMDSEP is used to change the character used to separate these commands.

Syntax

SET CMDS[EP] {OFF | ON | separator_char}

Parameters

SET CMDS[EP]

Is the command, which may be abbreviated SET CMDS.

OFF

Turns off the feature, requiring you to enter each command on a separate line. This is the default setting.

ON

Allows you to enter multiple SQL*Plus commands on one line and resets the separator character back to the default of a semicolon.

separator_char

Causes SQL*Plus to recognize the specified character as the command separator. You won't be allowed to make the command separator an alphabetic, numeric, or space character. This character may optionally be enclosed in either single or double quotes. In some cases, such as when you change it to a semicolon, you will need the quotes.

Examples

The following example turns this feature on, sets the separator character to an exclamation point, and shows how two commands may be placed on one line:

SQL> SET CMDSEP ON
SQL> SET CMDSEP "!"
SQL> SHOW CMDSEP! SHOW BUFFER!
cmdsep "!" (hex 21)
buffer SQL
SQL>

Get Oracle SQL*Plus: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.