Skip Headers
Oracle® Database PL/SQL Language Reference
11g Release 2 (11.2)

Part Number E25519-05
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
LNPLS01354

RETURNING INTO Clause

The RETURNING INTO clause specifies the variables in which to store the values returned by the statement to which the clause belongs. The variables can be either individual variables or collections. If the statement affects no rows, then the values of the variables are undefined.

The static RETURNING INTO clause belongs to a DELETE, INSERT, or UPDATE statement. The dynamic RETURNING INTO clause belongs to the EXECUTE IMMEDIATE statement.

Note:

You cannot use the RETURNING INTO clause for remote or parallel deletes.

LNPLS1803Topics

Syntax

LNPLS1309static_returning_clause ::=

Description of static_returning_clause.gif follows
Description of the illustration static_returning_clause.gif

LNPLS1310dynamic_returning_clause ::=

Description of dynamic_returning_clause.gif follows
Description of the illustration dynamic_returning_clause.gif

LNPLS1311into_clause ::=

Description of into_clause.gif follows
Description of the illustration into_clause.gif

LNPLS1312bulk_collect_into_clause ::=

Description of bulk_collect_into_clause.gif follows
Description of the illustration bulk_collect_into_clause.gif

Semantics

LNPLS1804static_returning_clause

LNPLS1319column

Expression whose value is the name of a column of a database table.

LNPLS1805into_clause

Specifies the variables or record in which to store the column values that the statement returns.

LNPLS1806Restriction on into_clause Use into_clause in dynamic_returning_clause if and only if dynamic_sql_stmt (which appears in "EXECUTE IMMEDIATE Statement") returns a single row.

LNPLS1318record

The name of a record variable in which to store the row that the statement returns. For each select_item in the statement, the record must have a corresponding, type-compatible field.

LNPLS1320variable

Either the name of a scalar variable in which to store a column that the statement returns or the name of a host cursor variable that is declared in a PL/SQL host environment and passed to PL/SQL as a bind variable. Each select_item in the statement must have a corresponding, type-compatible variable. The data type of a host cursor variable is compatible with the return type of any PL/SQL cursor variable.

LNPLS1807Restriction on variable variable cannot have the data type BOOLEAN.

LNPLS1808bulk_collect_into_clause

Specifies one or more existing collections or host arrays in which to store the rows that the statement returns. For each select_item in the statement, bulk_collect_into_clause must have a corresponding, type-compatible collection or host_array.

For the reason to use this clause, see "Bulk SQL and Bulk Binding".

LNPLS1809Restriction on bulk_collect_into_clause Use the bulk_collect_into_clause clause in dynamic_returning_clause if and only if dynamic_sql_stmt (which appears in "EXECUTE IMMEDIATE Statement") can return multiple rows.

LNPLS1074collection

Name of a collection variable in which to store the rows that the statement returns.

LNPLS1810Restrictions on collection 

LNPLS1315:host_array

Name of an array declared in a PL/SQL host environment and passed to PL/SQL as a bind variable. Do not put space between the colon (:) and host_array.

Examples

Related Topics

LNPLS1811In this chapter:

LNPLS1812In other chapters:

Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF