Neoview SQL Reference Manual (R2.4)
In Neoview SQL, the NCHAR type specification is equivalent to:
• NATIONAL CHARACTER
• NATIONAL CHAR
• CHAR ... CHARACTER SET ..., where the character set is the character set for NCHAR
Similarly, you can use NCHAR VARYING, NATIONAL CHARACTER VARYING, NATIONAL
CHAR VARYING, and VARCHAR ... CHARACTER SET ... , where the character set is the
character set for NCHAR. The character set for NCHAR is determined when Neoview SQL is
installed on the Neoview platform. By default, Neoview SQL is installed with UCS2 as NCHAR's
character set, unless you request to have Neoview SQL installed with ISO88591 as NCHAR's
character set.
Datetime Data Types
A value of datetime data type represents a point in time according to the Gregorian calendar
and a 24-hour clock in local civil time (LCT). A datetime item can represent a date, a time, or a
date and time.
When a numeric value is added to or subtracted from a date type, the numeric value is
automatically CASTed to an INTERVAL DAY value. When a numeric value is added to or
subtracted from a time type or a timestamp type, the numeric value is automatically CASTed to
an INTERVAL SECOND value. For information on CAST, see “CAST Expression” (page 337).
Neoview SQL accepts dates, such as October 5 to 14, 1582, that were omitted from the Gregorian
calendar. This functionality is a Neoview SQL extension.
The range of times that a datetime value can represent is:
January 1, 1 A.D., 00:00:00.000000 (low value) December 31, 9999, 23:59:59.999999 (high value)
Neoview SQL has three datetime data types:
datetime-type is:
DATE
| TIME [(time-precision)]
| TIMESTAMP [(timestamp-precision)]
DATE
specifies a datetime column that contains a date in the external form yyyy-mm-dd and stored
in four bytes.
TIME [(time-precision)]
specifies a datetime column that, without the optional time-precision, contains a time in the
external form hh:mm:ss and is stored in three bytes. time-precision is an unsigned integer
that specifies the number of digits in the fractional seconds and is stored in four bytes. The
default for time-precision is 0, and the maximum is 6.
TIMESTAMP [(timestamp-precision)]
specifies a datetime column that, without the optional timestamp-precision, contains a
timestamp in the external form yyyy-mm-dd hh:mm:ss and is stored in seven bytes.
timestamp-precision is an unsigned integer that specifies the number of digits in the
fractional seconds and is stored in four bytes. The default for timestamp-precision is 6, and
the maximum is 6.
Data Types 235