When a lot of data conversion processing operations, will have to convert 0.007007040000 to 0.70% of the demand, we use Oracle SQL functions to_char can realize the conversion.
this function is used to set the DATE or NUMBER data type conversion into a display string, format is to_char (number_type format_mask).
format '999.99', said nine digits corresponding to a specified value, if the value is 0, ignore don't show, if the specified digits without value, is expressed in space.
format '0990.990', 0 indicates digits corresponding to a specified value, if the value is 0 indicates to 0, if there is no value also display to zero.
format 'FM990.90, FM said there was no value location number strings that will be displayed and the display space, ltrim function similar to.

SQL> The select to_char (12304.560, '999.99') from dual;
TO_CHAR (12304.560, '999.99')
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
#######
SQL> The select to_char (104.560, '999.99') from dual;
TO_CHAR (104.560, '999.99')
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

104.56 SQL> The select to_char (104.560, '99999.99') from dual;
TO_CHAR (104.560, '99999.99')
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

104.56 SQL> The select to_char (104.560, '99999.990') from dual;
TO_CHAR (104.560, '99999.990')
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

104.560 SQL> The select to_char (104.560, '0099.990') from dual;
TO_CHAR (104.560, '0099.990')
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
0104.560


SQL>
SQL> The select to_char (round (0.007007040000 4) * 100, 'FM99999999990.90') | | '%' as aa,
2 length (to_char (round (0.007007040000 4) * 100, 'FM99999999990.90') | | '%') as bb
3 from dual; AA BB

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -

0.70% 5 SQL>
SQL> The select to_char (round (0.007007040000 4) * 100, '99999999990.90') | | '%' as aa,
2 length (to_char (round (0.007007040000 4) * 100, '99999999990.90') | | '%') as bb
3 from dual; AA BB

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
0.70% and

this is to_char converts Numbers into strings of common features, there are some other format, see the to_char (numeric) the format of the template.


template described 9 with the value of the specified digits

0 leading zero value. (period) decimal point
, (comma) group (thousand) delimiters
PR negative within Angle brackets
S subtractive negative (localization)
L currency symbol (localization)
D decimal (localization)
G grouping separators (localization)
MI in indicating the location of the minus sign (if the number <0)
PL in indicating the location of the plus sign (if the number >0)
SG positive/negative sign the location specified in the
RN Roman numerals (enter between 1 and 3999)
TH or TH into ordinal number
V mobile n bits (decimal) (see note)
EEEE scientific numeration. Now is not supported.

it can also convert the time format into a string, just format is more complicated.


This concludes the body part