Special restrictions apply to an expression resulting in a varying-length string data type whose maximum length is greater than 254 bytes; such expressions are not permitted in:
In addition to the restrictions listed above, expressions resulting in LONG VARCHAR or CLOB data types are not permitted in:
NUL-terminated character strings found in C are handled differently, depending on the standards level of the precompile option. See the C language specific section in the Application Programming Guide for more information on the treatment of NUL-terminated character strings.
This data type cannot be created in a table. It can only be used to insert data into and retrieve data from the database.
Each character string is further defined as one of:
SBCS data is supported only in a SBCS database. Mixed data is only supported in an MBCS database.
A graphic string is a sequence of bytes which represents double-byte character data. The length of the string is the number of double-byte characters in the sequence. If the length is zero, the value is called the empty string. This value should not be confused with the null value.
Graphic strings are not validated to ensure that their values contain only double-byte character code points. (13) Rather, the database manager assumes that double-byte character data is contained within graphic data fields. The database manager checks that a graphic string value is an even number of bytes in length.
A graphic string data type may be fixed length or varying length; the semantics of fixed length and varying length are analogous to those defined for character string data types.
All values of a fixed-length graphic string column have the same length, which is determined by the length attribute of the column. The length attribute must be between 1 and 127, inclusive.
Varying-length graphic strings are of three types: VARGRAPHIC, LONG VARGRAPHIC, and DBCLOB.
Special restrictions apply to an expression resulting in a varying-length graphic string data type whose maximum length is greater than 127. Those restrictions are the same as specified in Restrictions Using Varying-Length Character Strings.
NUL-terminated graphic strings found in C are handled differently, depending on the standards level of the precompile option. See the C language specific section in the Application Programming Guide for more information on the treatment of NUL-terminated graphic strings.
This data type cannot be created in a table. It can only be used to insert data into and retrieve data from the database.
A binary string is a sequence of bytes. Unlike a character string which usually contains text data, a binary string is used to hold non-traditional data such as pictures. Note that character strings of the 'bit data' subtype may be used for similar purposes, but the two data types are not compatible. The BLOB scalar function can be used to cast a character for bit string to a binary string. The length of a binary string is the number of bytes. It is not associated with a coded character set. Binary strings have the same restrictions as character strings (see Restrictions Using Varying-Length Character Strings for details).
All numbers have a sign and a precision. The precision is the number of bits or digits excluding the sign. The sign is considered positive if the value of a number is zero.
A small integer is a two byte integer with a precision of 5 digits. The range of small integers is -32768 to 32767.
A large integer is a four byte integer with a precision of 10 digits. The range of large integers is -2147483648 to +2147483647.
A big integer is an eight byte integer with a precision of 19 digits. The range of big integers is -9223372036854775808 to +9223372036854775807.
A single-precision floating-point number is a 32 bit approximation of a real number. The number can be zero or can range from -3.402E+38 to -1.175E-37, or from 1.175E-37 to 3.402E+38.
A double-precision floating-point number is a 64 bit approximation of a real number. The number can be zero or can range from -1.79769E+308 to -2.225E-307, or from 2.225E-307 to 1.79769E+308.
A decimal value is a packed decimal number with an implicit decimal point. The position of the decimal point is determined by the precision and the scale of the number. The scale, which is the number of digits in the fractional part of the number, cannot be negative or greater than the precision. The maximum precision is 31 digits. For information on packed decimal representation, see Packed Decimal Numbers.
All values of a decimal column have the same precision and scale. The range of a decimal variable or the numbers in a decimal column is -n to +n, where the absolute value of n is the largest number that can be represented with the applicable precision and scale. The maximum range is -10**31+1 to 10**31-1.
(13) The exception to this rule is an application precompiled with the WCHARTYPE CONVERT option. In this case, validation does occur. See "Programming in C and C++" in the Application Programming Guide for details.