DOUBLE function

The DOUBLE function returns a floating-point number corresponding to a number or a character string.

The returned value corresponds to a number if the argument is a numeric expression.

The returned value corresponds to a character string representation of a number if the argument is a string expression.

Numeric to double

DOUBLE [ PRECISION ] ( numericExpression )
numericExpression
The argument is an expression that returns a value of any built-in numeric data type.

The result of the function is a double-precision floating-point number. If the argument can be null, the result can be null; if the argument is null, the result is the null value. The result is the same number that would occur if the argument were assigned to a double-precision floating-point column or variable.

Character string to double

DOUBLE ( stringExpression )
stringExpression
The argument can be of type CHAR or VARCHAR in the form of a numeric constant. Leading and trailing blanks in argument are ignored.

The result of the function is a double-precision floating-point number. The result can be null; if the argument is null, the result is the null value. The result is the same number that would occur if the string was considered a constant and assigned to a double-precision floating-point column or variable.