Name

DEFINE

Synopsis

DEF[INE] [variable_name [= text]]

The DEFINE command allows you to create a user variable (or substitution variable) and to assign it a value. Here’s an example:

DEFINE company_name = "The Fictional Company"

You can also use DEFINE to list the value of one variable, or to list the values of all variables, as shown in the following examples:

DEFINE company_name
DEFINE

Parameters

variable_name

The name of the variable you want to create. Issue the command with only a variable name, and SQL*Plus displays the current contents of that variable, if it exists.

text

The text you want to assign to the variable.

Get Oracle SQL Plus Pocket Reference, 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.