DOUBLE

The DOUBLE function returns a floating-point number corresponding to a:

  • number if the argument is a numeric expression
  • 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.

Results

The data type of the returned value is a  DOUBLE PRECISION number.

If the argument can be NULL, the result can be NULL; if the argument is NULL, the result is the NULLvalue.

The result is the same value that would result 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  VARCHAR in the form of a numeric constant. Leading and trailing blanks in argument are ignored.

Results

The data type of the returned value is a  DOUBLE PRECISION number.

If the argument can be NULL, the result can be NULL; if the argument is NULL, the result is the NULLvalue.

The result is the same value that would result if the string was considered a constant and assigned to a double-precision floating-point column or variable.

Example

splice> VALUES DOUBLE(84.4);
1
----------
84.4

1 row selected

See Also