background image
<< Dropping a Package | Declaring Variables and Constants >>
<< Dropping a Package | Declaring Variables and Constants >>

Using Variables and Constants

Using Variables and Constants
Developing and Using Stored Procedures 4-15
3.
In the Drop Package dialog, click Apply.
4.
In the Confirmation dialog, click OK.
Using Variables and Constants
One of the significant advantages that PL/SQL offers over SQL is its ability to use
variables and constants in programming constructs.
A variable is defined by the user to hold a specified value of a particular data type.
This value is mutable; it can change at runtime.
A constant holds a value that cannot be changed; the compiler ensures that this value
is immutable and does not compile any code that could change it. You should use
constants in your code instead of direct values because they will make it simpler to
maintenance of your code base over time. When you declare all values that do not
change as constants, this optimizes your compiled code.
PL/SQL Data Types
In addition to the SQL data types such as
VARCHAR2
,
DATE
,
NUMBER
, and so on, Oracle
Database supports data types that you can use only through PL/SQL. These data
types include
BOOLEAN
, composite data types such as
RECORD
, reference types such as
REF CURSOR
and
INDEX BY TABLE
, and numerous specialized types that represent
numbers, characters, and date elements. One numeric type,
PLS_INTEGER
, is
especially useful because it performs binary integer arithmetic and has significant
performance benefits. Note that these PL/SQL types cannot be used at the level of the
schema (and therefore, in tables), but only for types and processes that are defined
within a package.
See Also:
Oracle Database SQL Language Reference for information on the
DROP PACKAGE
statement
See Also:
Oracle Database Concepts for information about variables and
constants