Returns the string equivalent of a number.
Parameter |
Description |
---|---|
numeric-expression |
Any approximate numeric (FLOAT, REAL, or DOUBLE precision) expression. |
length |
The number of characters to be returned (including the decimal point, all digits to the right and left of the decimal point, the sign, if any, and blanks). The default is 10 and the maximum length is 255. |
decimal |
The number of digits to the right of the decimal point to be returned. The default is 0. |
VARCHAR
If the integer portion of the number cannot fit in the length specified, then the result is NULL. For example, the following statement returns NULL:
SELECT STR( 1234.56, 3 ) FROM iq_dummy