Name

SET DEFINE

Synopsis

The SET DEFINE command changes the prefix character used to mark substitution variables. You can use SET DEFINE to turn variable substitution off.

Syntax

SET DEF[INE] {OFF | ON | prefix_char}

Parameters

SET DEF[INE]

Is the command, which may be abbreviated SET DEF.

OFF

Disables variable substitution.

ON

Enables variable substitution, and resets the substitution prefix character back to the default ampersand (&) character. Variable substitution is on by default.

prefix_char

Is the new substitution prefix character.

When you start SQL*Plus, variable substitution will be on by default, and the default prefix character is an ampersand. If you are running a script that uses ampersands in text strings, you may want to change the prefix character to something else. If your script doesn't use substitution variables, you may find it easiest to turn the feature off.

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.