Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Data type in Oracle

Data type LengthDescription
VARCHAR2(size) 1 - 4000 bytes Variable length character string. It is necessary to define maximum length in characters.
NVARCHAR2(size) 1 - 4000 bytes String of unicode characters of variable lenght. It is necessary to define maximum length in characters.
VARCHAR - Obsolete (used for backward compatibility only). VARCHAR is a synonym for VARCHAR2 but the usage may change in future versions.
CHAR(size) 1 - 2000 bytes Fixed length character string. It is necessary to define maximum length in characters (default 1).
NCHAR(size) 1 - 2000 bytes Fixed length unicode string. It is necessary to define maximum length in characters (default 1).
NUMBER(p,s) The precision p can range from 1 to 38. The scale s can range from -84 to 127. Number having precision p and scale s.
DATE from January 1, 4712 BC to December 31, 9999 AD. Date with accuracy of 1 second.
TIMESTAMP (fractional_seconds_precision) Accepted values of fractional_seconds_precision are 0 to 9. (default = 6) Date with the accuracy of fractions of a second. The accuracy can be defined as a number od decimal spaces of a second.
TIMESTAMP (fractional_seconds_precision) WITH {LOCAL} TIMEZONE Accepted values of fractional_seconds_precision are 0 to 9. (default = 6) As TIMESTAMP, but with time zone definition.
INTERVAL YEAR (year_precision) TO MONTH Accepted values are 0 to 9. (default = 2) Time in years and months, where year_precision is the number of digits in the "YEAR" datetime field.
INTERVAL DAY (day_precision) TO SECOND (fractional_seconds_precision) day_precision may be 0 to 9. (default = 2) fractional_seconds_precision may be 0 to 9. (default = 6) Time in days, hours, minutes, and seconds.

day_precision is the maximum number of digits in "DAY".

fractional_seconds_precision is the max number of fractional digits in the SECOND field.

RAW(size) 1 - 2000 bytes Raw binary data of length size bytes. You must specify size for a RAW value.
ROWID 10 bytes Hexadecimal string representing the unique address of a row in its table (primarily for values returned by the ROWID pseudocolumn).
UROWID The maximum size and default is 4000 bytes Hexadecimal string representing the logical address of a row of an index-organized table
MLSLABEL - Binary format of an operating system label. This data type is used with Trusted Oracle7.
CLOB 8 - 128 TB (4 Gigabytes - 1) * (database block size) Large string of characters stored in Large Object.
NCLOB 8 - 128 TB (4 Gigabytes - 1) * (database block size) Large string of unicode characters in Large Object.
BLOB 8 - 128 TB (4 Gigabytes - 1) * (database block size) Binary Large Object.
BFILE 8 - 128 TB (4 Gigabytes - 1) * (database block size) Pointer to binary file on disk
XMLType 4 Gigabytes XML data.
 
See download.oracle.com/docs/cd/B28359_01/server.111/b28318/datatype.htm.
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice