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
LNPLS01388

Scalar Variable Declaration

A scalar variable stores a value with no internal components. The value can change.

A scalar variable declaration specifies the name and data type of the variable and allocates storage for it. The declaration can also assign an initial value and impose the NOT NULL constraint.

You reference a scalar variable by its name.

LNPLS1816Topics

Syntax

LNPLS1358variable_declaration ::=

Description of variable_declaration.gif follows
Description of the illustration variable_declaration.gif

See "expression ::=".

Semantics

LNPLS1376variable

Name of the variable that you are declaring.

LNPLS1373datatype

Name of a scalar data type, including any qualifiers for size, precision, and character or byte semantics. For information about scalar data types, see Chapter 3, "PL/SQL Data Types".

LNPLS1817NOT NULL

Imposes the NOT NULL constraint on the variable. For information about this constraint, see "NOT NULL Constraint".

LNPLS1366expression

Value to be assigned to the variable when the declaration is elaborated. expression and variable must have compatible data types.

Examples

Related Topics

LNPLS1818In this chapter:

LNPLS1819In 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