SQL*Plus User's Guide and Reference
Release 8.1.5

A66736-01

Library

Product

Contents

Index

Prev Up Next

Command Reference, 32 of 52


PRINT

Purpose

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

Syntax

PRI[NT] [variable ...]

Terms and Clauses

Refer to the following for a description of the clause or term:

variable ...

      Represents the names of the bind variables whose values you wish to display.

Enter PRINT with no variables to print all bind variables.

Usage Notes

Bind variables are created using the VARIABLE command. For more information and examples, see the VARIABLE command in this chapter.

You can control the formatting of the PRINT output just as you would query output. For more information, see the formatting techniques described in Chapter 4.

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. For more information, see the SET command in this chapter.

Example

The following example illustrates a PRINT command:

SQL> VARIABLE n NUMBER
SQL> BEGIN
  2   :n := 1;
  3  END;
SQL> PRINT n
         N
----------
         1


Prev Up Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index