- Data types:
- PL/SQL is a superset of the SQL. So, it supports all the data types provided by SQL.
- Along with this, in PL/SQL Oracle provides subtypes of data types.
- For example, the data type NUMBER has a subtype called INTEGER.
- These subtypes can be used in PL/SQL block to make the data type compatible with the data types of other programming languages.
- Subtypes are simply alternative names for Oracle data types, and so, they must follow the rules of their associated data type.
Category |
Data type |
Subtype |
Numerical |
NUMBER |
BINATY_INTEGER, DEC, DECIMAL, DOUBLEPRECISION, FLOAT, INTEGER,INT, REAL,NATURAL,NUMARIC |
Character |
CHAR, LONG,VARCHAR2 |
CHARCTER, VARCHAR, STRING, NCHAR |
Date |
DATE |
|
Binary |
RAW, LONG RAW |
|
Boolean |
BOOLEAN |
Can have values like TRUE, FALSE and NULL |
RowID |
ROWID |
Stores values of address location of each record |
Leave a Comment