PRINT

Syntax

PRINT [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 Language 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