number
number(integer
) number(string
)
The NUMBER function has the following arguments:
integer
The integer value which you want to convert to a double precision number value
string
The string value which you want to convert to an double precision number value
The number function will convert the input value to an double precision number value.
If the input is an integer type then the value is promoted to the double precision value that is closest to the integer value.
If the input is a string value the function will attempt to parse the input as a number.
If the input is a number then the value is returned unchanged
Formula |
Description |
Result |
---|---|---|
number(34) |
Double precision number value of 34 |
34.0 |
number(-17.82) | Double precision number value of -17.82 | -17.82 |
number('6.87') | Double precision number value of '6.87' | 6.87 |