Skip Headers
SQL*Plus® User's Guide and Reference
Release 10.2

Part Number B14357-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

PRINT

Syntax

PRI[NT] [variable ...]

where variable ... represents names of bind variables whose values you want to display.

Displays the current values of bind variables. For more information on bind variables, see your Oracle Database PL/SQL User's Guide and Reference.

Enter PRINT with no variables to print all bind variables.

Usage

Bind variables are created using the VARIABLE command. See VARIABLE for more information and examples.

You can control the formatting of the PRINT output just as you would query output. For more information, see the formatting techniques described in Formatting SQL*Plus Reports.

To automatically display bind variables referenced in a successful PL/SQL block or used in an EXECUTE command, use the AUTOPRINT clause of the SET command. See SET for more information.

Examples

The following example illustrates a PRINT command:

VARIABLE n NUMBER
BEGIN
:n := 1;
END;
/
PL/SQL procedure successfully completed.

PRINT n
N
----------
1