ORACLE DATA TYPES – Learn about data types classification and their usages with full explanation.
ORACLE DATA TYPES
- This are built-in(Predefined) data Types. They categorize as following.
CHARACTER DATA TYPES
- CHAR
- NCHAR
- VARCHAR2 and VARCHAR
- NVARCHAR2
NUMBER DATA TYPES
- NUMBER
- NUMERIC
- FLOAT
- DEC
- DECIMAL
- INTEGER
- INT
- SMALL INT
- REAL
- DOUBLE PRECISION
LONG AND RAW DATA TYPES
- LONG
- RAW
- LONG RAW
DATETIME DATA TYPES
- DATE
- TIMESTAMP
- TIME STAMP WITH TIME ZONE
- TIME STAMP WITH LOCAL TIME ZONE
- INTERVAL YEAR
- INTERVAL DAY
ROWID DATA TYPES
- ROWID
- UROWID
BINARY DATA TYPES
- BFILE
- BLOB
- CLOB
- NCLOB
- BINARY FLOAT
- BINARY DOUBLE
DATATYPE | DESCRIPTION | DATA TYPE SIZE | NOTE POINTS |
---|---|---|---|
CHAR | Fixed Length Character data type |
|
|
NCHAR | Fixed Length Character data type |
|
|
VARCHAR2 or VARCHAR | Variable length character data type |
|
|
NVARCHAR2 | Variable length character data type |
|
|
NUMBER | Variable length Numeric data type |
| |
FLOAT | Numeric data type |
| |
BINARY_FLOAT | Single precision floating point number data type |
| |
BINARY_DOUBLE | Double precision floating point data type. |
| |
LONG | Variable length character data type |
| |
RAW | Variable length Raw binary data type |
| |
LONG RAW | Variable length Raw binary data type |
| |
DATE | Fixed Length Date and Time data type |
| |
ROWID | Fixed Length Binary Data |
| |
BFILE | binary data type |
|
|
BLOB | Binary data type< |
| |
CLOB | Single-byte Character data. |
| |
NCLOB | Single Byte or Fixed Length Multi Byte data |
|
NOTES
CHARACTER DATA TYPES
- CHAR and NCHAR datatypes store fixed-length character strings.
- VARCHAR2 and NVARCHAR2 datatypes store variable-length character strings. (The VARCHAR datatype is synonymous with the VARCHAR2 datatype.)
- CLOB and NCLOB datatypes store single-byte and multibyte character strings of up to four gigabytes.
- The LONG datatype stores variable-length character strings containing up to two gigabytes, but with many restrictions.
NUMBER DATA TYPE
- NUMBER datatype to store real numbers in a fixed-point or floating-point format.
ROWIDS AND ROWID DATATYPE
- ROWID datatype to store the address (rowid) of every row in the database.
- Physical rowids store the addresses of rows in ordinary tables (excluding index-organized tables), clustered tables, table partitions and subpartitions, indexes, and index partitions and subpartitions.
- Logical rowids store the addresses of rows in index-organized tables.
- A single datatype called the universal rowid, or UROWID, supports both logical and physical rowids, as well as rowids of foreign tables
- A column of the UROWID datatype can store all kinds of rowids. The value of the COMPATIBLE initialization parameter (for file format compatibility) must be set to 8.1 or higher to use UROWID columns.