Database Reference
In-Depth Information
Figure 8.9
Shorter Page Size
Affects the Page
Break or Page
Eject.
LINESIZE 132; to the end of the SQL*Plus configuration file called GLO-
GIN.SQL in the $ORACLE_HOME/sqlplus/admin directory. Rarely do I
need to use other settings. If so, I change these values manually, usually for
specific queries.
That's enough about environmental variables. Let's now look at using
scripts and variables.
8.2
Using Scripts and Variables
SQL*Plus supports a simple method of defining and prompting for variables
using ampersand characters (&). Any string beginning with & or && is a
variable! In programming, the act of replacing a variable with a value is
known as variable substitution . A named variable is a bucket or placeholder for
a value, where the variable is used to reference or access its contained value.
The & tells SQL*Plus to prompt for a value every time it encounters the
variable. The && tells SQL*Plus to use the same value of the variable it
already prompted for.
Note: Use SQL*Plus instead of SQL*Plus Worksheet when using variables
because you will be able to respond to prompts from SQL*Plus more easily.
It is possible, but not usually practical, to use variables with SQL*Plus
Worksheet. iSQL*Plus does not support variables yet.
Search WWH ::




Custom Search