Database Reference
In-Depth Information
Numeric Data Types
Description
1 to 22 bytes. Fixed precision (p) and scale (s) numbers. Range is from -10 38
+1 to 10 38 - 1 with maximum precision (p) of 38. Precision ranges
from 1 through 38, and default precision is 18. Scale (s) indicates the
number of digits to the right of the decimal place. Default scale value
is 0, and scale values range from -84 to 127p, where 0 <= s <= p.
NUMBER (p[,s])
FLOAT (p)
1 to 22 bytes. Implemented as NUMBER(p). The value of p ranges
from 1 to 126 bits.
4-byte 32-bit floating point number.
BINARY_FLOAT
BINARY_LONG
8-byte 64-bit floating point number.
RAW (n)
n-byte fixed-length raw binary data. Range of n is from 1 through
2000.
LONG RAW
Raw variable-length binary data. Maximum is 2 GBytes.
BLOB
Maximum [(4-GByte - 1)x(database block size)] binary large object.
BFILE
See documentation.
Date and Time
Data Types
Description
DATE
7-bytes fixed. Default format is set explicitly with the
NLS_DATE_FORMAT parameter. Range is from January 1, 4712 BC
through December 31, 9999 AD. It contains the fields YEAR, MONTH,
DAY, HOUR, MINUTE and SECOND (no fractional seconds). It does not
include a time zone.
TIMESTAMP (p)
Includes fractional seconds base on a precision of p. Default of p is 6,
and the range is 0 to 9. 7 to 11-bytes fixed, based on precision. Default
format is set explicitly with the NLS_TIMESTAMP_FORMAT parameter.
Range is from January 1, 4712 BC through December 31, 9999 AD.
It contains the fields YEAR, MONTH, DAY, HOUR, MINUTE and
SECOND. It contains fractional seconds. It does not include a
time zone.
TIMESTAMP (p)
WITH TIME ZONE
Includes fractional seconds base on a precision of p. Default of p is 6,
and the range is 0 to 9. 13-bytes fixed. Default format is set explicitly
with the NLS_TIMESTAMP_FORMAT parameter. Range is from January 1,
4712 BC through December 31, 9999 AD. It contains the fields YEAR,
MONTH, DAY, TIMEZONE_HOUR, TIMEZONE_MINUTE and
TIMEZONE_SECOND. It contains fractional seconds. It includes a
time zone.
TIMESTAMP (p)
WITH LOCAL TIME
ZONE
Basically the same as TIMESTAMP WITH TIME ZONE, with the
following modifications: (1) Data is stored with times based on the
database time zone, and (2) Users view data in session time zone.
INTERVAL YEAR
[p(year)] TO MONTH
See documentation.
INTERVAL DAY
[p(day)] TO SECOND
[p(seconds)]
See documentation.
Figure 7-4
Continued
Search WWH ::




Custom Search