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

Part Number E17126-03
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
View PDF

Constant Declaration

A constant holds a value that does not change.

A constant declaration specifies the name, data type, and value of the constant and allocates storage for it. The declaration can also impose the NOT NULL constraint.

Topics:

Syntax

constant_declaration ::=

constant_declaration
Description of the illustration constant_declaration.gif

See:

Semantics

constant_name

The name of the constant that you are declaring.

datatype

The name of a datatype for which a variable can be declared with an initial value.

NOT NULL

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

expression

The initial value for the constant. The value of expression must have a data type that is compatible with datatype. When constant_declaration is elaborated, the value of expression is assigned to constant_name.

Examples

Related Topics

In this chapter:

In other chapters: