Here’s the brief about PL/SQL Data Types in Declare Section
• Scalar
• References a single value
• Composite
• References a data structure
• Reference
• References a specific database item
Scalar Data Types
• Database scalar data types:
• VARCHAR2
• CHAR
• DATE
• LONG
• NUMBER
• Non-database scalar data types:
• Integers: BINARY_INTEGER, INTEGER, INT, SMALLINT
• Decimal numbers: DEC, DECIMAL, DOUBLE, PRECISION, NUMERIC, REAL
• BOOLEAN
Composite Data Types
• Reference multiple data elements, such as a record
• Types:
• RECORD
• TABLE
• VARRAY
Reference Data Types
(Refers to data in tables)
• Reference a database item
• Assume data type of item
• %TYPE: assumes data type of field
• %ROWTYPE: assumes data type of entire row
Leave a comment