Name

SET CONCAT

Synopsis

The CONCAT setting changes the character used to terminate a substitution variable reference. You can use the command to turn the feature off so that SQL*Plus doesn't recognize any character as the terminator.

Syntax

SET CON[CAT] {OFF | ON | concat_char}

Parameters

SET CON[CAT]

Is the command, which may be abbreviated SET CON.

OFF

Turns off this feature completely. SQL*Plus won't recognize any character as the termination character for substitution variable names.

ON

Turns this feature back on and resets the character back to the default value of a period.

concat_char

Is the new termination character. The default value is a period.

Examples

This setting is important only when you immediately follow a substitution variable name with characters that SQL*Plus might interpret as part of the name. Consider the following example:

DEFINE table="PROJECT"
SELECT &&table._name FROM &&table;

The period (or concatenation character) in the SELECT statement is used to terminate the reference to &&table. Without the period, SQL*Plus would see &&table_name as the substitution variable.

Tip

The concatenation character is never left in the line. When SQL*Plus substitutes a value for the variable, the concatenation character goes away along with the variable name.

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.