Oracle Database Data Types

 

VARCHAR2: A variable-length character string that can store up to 4KB of data. For example, name VARCHAR2(50).

NVARCHAR2: A variable-length Unicode character string that can store up to 4000 bytes of data. For example, address NVARCHAR2(100).

NUMBER: A number having precision p and scale s. The range of p is from 1 to 38, and the range of s is from -84 to 127. A NUMBER value requires from 1 to 22 bytes. For example, age NUMBER(3) & mark(4,2).

FLOAT: A floating-point number represented internally as NUMBER. The range of p is from 1 to 126 binary digits. A FLOAT value requires from 1 to 22 bytes. For example, `price FLOAT(5).

LONG: Character data of variable length up to 2 gigabytes. For example, description LONG.

DATE: A date value that can range from January 1, 4712 BC, to December 31, 9999 AD. The size is fixed at 7 bytes. For example, dob DATE`.

BINARY_FLOAT: A 32-bit floating-point number that requires 4 bytes. For example, weight BINARY_FLOAT.

BINARY_DOUBLE: A 64-bit floating-point number that requires 8 bytes. For example, height BINARY_DOUBLE.

TIMESTAMP: A data type that contains the datetime fields YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND. It contains fractional seconds but does not have a time zone. The size is 7 or 11 bytes, depending on the precision. For example, created_at TIMESTAMP.

TIMESTAMP WITH TIME ZONE: A data type that contains the datetime fields YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TIMEZONE_HOUR, and TIMEZONE_MINUTE. It has fractional seconds and an explicit time zone. The size is fixed at 13 bytes. For example, updated_at TIMESTAM WITH TIME ZONE.

INTERVAL YEAR TO MONTH: Stored as an Interval of Years and Months.

INTERVAL DAY TO SECOND: Stored as as Interval of Days, Hours, Minutes and Seconds.

BLOBs: binary Large Objects.

CLOBs: Character Large Objects.

RAW: Raw binary data.

XMLTYPE: It’s Stored XML Documents.

Comments