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
LNPLS01301

Assignment Statement

The assignment statement sets the value of a data item to a valid value.

LNPLS873Topics

Syntax

LNPLS874assignment_statement ::=

Description of assignment_statement.gif follows
Description of the illustration assignment_statement.gif

See "expression ::=".

LNPLS875assignment_statement_target ::=

Description of assignment_statement_target.gif follows
Description of the illustration assignment_statement_target.gif

LNPLS876placeholder ::=

Description of placeholder.gif follows
Description of the illustration placeholder.gif

Semantics

LNPLS880assignment_statement_target

Data item to which the value of expression is to be assigned.

LNPLS890collection_variable

Name of a collection variable.

LNPLS896index

Index of an element of collection_variable. Without index, the entire collection variable is the assignment statement target.

index must be a numeric expression whose data type either is PLS_INTEGER or can be implicitly converted to PLS_INTEGER (for information about the latter, see "Predefined PLS_INTEGER Subtypes").

LNPLS909cursor_variable

Name of a cursor variable.

LNPLS920:host_cursor_variable

Name of a cursor variable 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_cursor_variable.

The data type of a host cursor variable is compatible with the return type of any PL/SQL cursor variable.

LNPLS922object

Name of an instance of an abstract data type (ADT).

LNPLS927attribute

Name of an attribute of object. Without attribute, the entire ADT is the assignment statement target.

LNPLS931out_parameter

Name of a formal OUT or IN OUT parameter of the subprogram in which the assignment statement appears.

LNPLS932record_variable

Name of a record variable.

LNPLS933field

Name of a field of record_variable. Without field, the entire record variable is the assignment statement target.

LNPLS934scalar_variable

Name of a PL/SQL scalar variable.

LNPLS935placeholder

LNPLS936:host_variable

Name of a variable 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_variable.

LNPLS937:indicator_variable

Name of an indicator variable declared in a PL/SQL host environment and passed to PL/SQL as a bind variable. (An indicator variable indicates the value or condition of its associated host variable. For example, in the Oracle Precompiler environment, an indicator variable can a detect null or truncated value in an output host variable.) Do not put space between host_variable and the colon (:) or between the colon and indicator_variable. This is correct:

:host_variable:indicator_variable

LNPLS938expression

Expression whose value is to be assigned to assignment_statement_target.

expression and assignment_statement_target must have compatible data types.

Note:

Collections with elements of the same type might not have the same data type. For the syntax of collection type definitions, see "Collection Variable Declaration".

Examples

Related Topics

LNPLS939In this chapter:

LNPLS940In 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