Oracle® Database SQL Language Quick Reference 11g Release 2 (11.2) Part Number E17119-06 |
|
|
PDF · Mobi · ePub |
This section describes the kinds of Oracle built-in data types.
{ CHAR [ (size [ BYTE | CHAR ]) ] | VARCHAR2 (size [ BYTE | CHAR ]) | NCHAR [ (size) ] | NVARCHAR2 (size) }
{ DATE | TIMESTAMP [ (fractional_seconds_precision) ] [ WITH [ LOCAL ] TIME ZONE ]) | INTERVAL YEAR [ (year_precision) ] TO MONTH | INTERVAL DAY [ (day_precision) ] TO SECOND [ (fractional_seconds_precision) ] }
{ BLOB | CLOB | NCLOB | BFILE }
{ LONG | LONG RAW | RAW (size) }
{ NUMBER [ (precision [, scale ]) ] | FLOAT [ (precision) ] | BINARY_FLOAT | BINARY_DOUBLE }
{ ROWID | UROWID [ (size) ] }
The codes listed for the data types are used internally by Oracle Database. The data type code of a column or object attribute is returned by the DUMP
function.
Table 6-1 Built-in Data Type Summary
Code | Data Type | Description |
---|---|---|
1 |
|
Variable-length character string having maximum length
|
1 |
|
Variable-length Unicode character string having maximum length |
2 |
|
Number having precision |
2 |
|
A subtype of the |
8 |
|
Character data of variable length up to 2 gigabytes, or 231 -1 bytes. Provided for backward compatibility. |
12 |
|
Valid date range from January 1, 4712 BC, to December 31, 9999 AD. The default format is determined explicitly by the |
21 |
|
32-bit floating point number. This data type requires 4 bytes. |
22 |
|
64-bit floating point number. This data type requires 8 bytes. |
180 |
|
Year, month, and day values of date, as well as hour, minute, and second values of time, where |
181 |
|
All values of |
231 |
|
All values of
The default format is determined explicitly by the |
182 |
|
Stores a period of time in years and months, where |
183 |
|
Stores a period of time in days, hours, minutes, and seconds, where
The size is fixed at 11 bytes. |
23 |
|
Raw binary data of length |
24 |
|
Raw binary data of variable length up to 2 gigabytes. |
69 |
|
Base 64 string representing the unique address of a row in its table. This data type is primarily for values returned by the |
208 |
|
Base 64 string representing the logical address of a row of an index-organized table. The optional |
96 |
|
Fixed-length character data of length
|
96 |
|
Fixed-length character data of length |
112 |
|
A character large object containing single-byte or multibyte characters. Both fixed-width and variable-width character sets are supported, both using the database character set. Maximum size is (4 gigabytes - 1) * (database block size). |
112 |
|
A character large object containing Unicode characters. Both fixed-width and variable-width character sets are supported, both using the database national character set. Maximum size is (4 gigabytes - 1) * (database block size). Stores national character set data. |
113 |
|
A binary large object. Maximum size is (4 gigabytes - 1) * (database block size). |
114 |
|
Contains a locator to a large binary file stored outside the database. Enables byte stream I/O access to external LOBs residing on the database server. Maximum size is 4 gigabytes. |