1.0

Table Of Contents
-- cast a SMALLINT to a BIGINT
VALUES CAST (CAST (12 as SMALLINT) as BIGINT)
CEIL or CEILING function
The CEIL and CEILING functions round the specied number up, and return the smallest number that is greater
than or equal to the specied number.
The specied number must be a DOUBLE PRECISION on page 578 number.
If the specied number is NULL, the result of these functions is NULL.
If the specied number is equal to a mathematical integer, the result of these functions is the same as the
specied number.
If the specied number is zero (0), the result of these functions is zero.
If the specied number is less than zero but greater than -1.0, then the result of these functions is zero.
The returned value is the smallest (closest to negative innity) double oating point value that is greater than
or equal to the specied number. The returned value is equal to a mathematical integer. The data type of the
returned value is a DOUBLE PRECISION number.
Syntax
CEIL ( number )
CEILING ( number )
CHAR function
The CHAR function returns a xed-length character string representation.
The representations are:
A character string, if the rst argument is any type of character string.
A datetime value, if the rst argument is a date, time, or timestamp.
A decimal number, if the rst argument is a decimal number.
A double-precision oating-point number, if the rst argument is a DOUBLE or REAL.
An integer number, if the rst argument is a SMALLINT, INTEGER, or BIGINT.
The rst argument must be of a built-in data type. The result of the CHAR function is a xed-length character
string. If the rst argument can be null, the result can be null. If the rst argument is null, the result is the null
value. The rst argument cannot be an XML value. To convert an XML value to a CHAR of a specied length,
you must use the SQL/XML serialization operator XMLSERIALIZE.
Character to character syntax
CHAR (CharacterExpression [, integer] )
An expression that returns a value that is CHAR, VARCHAR, LONG
VARCHAR, or CLOB data type.
CharacterExpression
The length attribute for the resulting xed length character string. The value
must be between 0 and 254.
integer
If the length of the character-expression is less than the length attribute of the result, the result is padded with
blanks up to the length of the result. If the length of the character-expression is greater than the length attribute
of the result, truncation is performed. A warning is returned unless the truncated characters were all blanks and
the character-expression was not a long string (LONG VARCHAR or CLOB).
517
SQL Language Reference