Skip Headers
Previous
Previous
 
Next
Next

Dimensional Data Types

Table: Dimensional Data Types describes the data types that can be used for cubes and measures.

Dimensional Data Types

Data Type Description

BINARY_DOUBLE

A 64-bit floating number. A BINARY_DOUBLE value requires 9 bytes.

BINARY_FLOAT

A 32-bit floating number. A BINARY_FLOAT value requires 5 bytes.

CHAR (size [BYTE|CHAR])

A fixed length character string with a length of size characters or bytes. The size can range from 1 to 2000.

DATE

A valid date in the range from January 1, 4712 BC to December 31, 9999 CE. It contains the datetime fields YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND. It does not have fractional seconds or a time zone. The default format is determined explicitly by the NLS_DATE_FORMAT parameter and implicitly by the NLS_TERRITORY parameter. A DATE value requires 7 bytes.

DECIMAL (p,s)

A decimal number with precision p and scale s represented as a NUMBER data type.

FLOAT [(p)]

A subtype of NUMBER with precision p. A FLOAT is represented internally as NUMBER. The precision can range from 1 to 126 binary digits. A FLOAT value requires from 1 to 22 bytes.

INTEGER

A whole number represented as a NUMBER data type with a scale of 0.

INTERVAL DAY[(day_precision)] TO SECOND[(second_precision)]

A period of time in days, hours, minutes, and seconds. The day precision is the maximum number of digits in the DAY datetime field. The default is 2. The second precision is the number of digits in the fractional part of the SECOND field. The default value is 6. Both day and second precision can have a value from 0 to 9. An INTERVAL DAY TO SECOND value requires 11 bytes.

INTERVAL YEAR[(precision)] TO MONTH

A period of time in years and months. The precision is the number of digits in the YEAR datetime field, which can have a value of 0 to 9. The default precision is 2 digits. An INTERVAL YEAR TO MONTH value requires 5 bytes.

NCHAR[(size)]

A fixed length character string with a length of size characters. The size can range from 1 character to 2000 bytes. The maximum number of characters depends on the national character set, which can require up to four bytes per character.

NUMBER [(p[,s])]

A decimal number with precision p and scale s. The precision can range from 1 to 38. The scale can range from -84 to 127. A NUMBER value requires from 1 to 22 bytes.

NVARCHAR2(size)

A variable length Unicode character string with a maximum length of size characters. The size can range from 1 character to 4000 bytes. The maximum number of characters depends on the national character set, which can require up to four bytes per character.

TIMESTAMP[(precision)]

A valid date that contains the datetime fields YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND. It does not have a time zone. The precision is the number of digits in the fractional part of the SECOND field, which can have a value of 0 to 9. The default precision is 6 digits. The default format is determined explicitly by the NLS_DATE_FORMAT parameter and implicitly by the NLS_TERRITORY parameter. A TIMESTAMP value requires from 7 to 11 bytes depending on the precision.

TIMESTAMP [(precision)] WITH LOCAL TIME ZONE

A valid date with the same description as TIMESTAMP WITH TIME ZONE with these exceptions:

  • The data is stored in the database with the database time zone.

  • The data is converted to the session time zone when it is retrieved.

  • A TIMESTAMP WITH LOCAL TIME ZONE value requires from 7 to 11 bytes depending on the precision.

TIMESTAMP[(precision)] WITH TIME ZONE

A valid date that contains the datetime fields YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TIMEZONE_HOUR, and TIMEZONE_MINUTE. The precision is the number of digits in the fractional part of the SECOND field, which can have a value of 0 to 9. The default precision is 6 digits. The default format is determined explicitly by the NLS_DATE_FORMAT parameter and implicitly by the NLS_TERRITORY parameter. A TIMESTAMP WITH TIMEZONE value requires 13 bytes.

VARCHAR2(size [BYTE|CHAR])

A variable length character string with a maximum length of size characters or bytes. The size can range from 1 to 4000.