在SQL*PLUS中,用SET NUMFORMAT=999,999,00就可以.SELECT 12345 FROM DUAL; 12345 ----------- 12,345.00
The following are number examples for the to_char function. to_char(1210.73, '9999.9') would return '1210.7' to_char(1210.73, '9,999.99') would return '1,210.73' to_char(1210.73, '$9,999.00') would return '$1,210.73' to_char(21, '000099') would return '000021'
select to_char(col_name,'fm99999.99') from tablename
1 在建表的时候将这个字段类型改成 number(3,2) 这样输出来的就是800.00了;
2 就是查询的时候把800转化成字符串 在加上字符".00";
但是这两种方法好像都不好。
-----------
12,345.00
to_char(1210.73, '9,999.99') would return '1,210.73'
to_char(1210.73, '$9,999.00') would return '$1,210.73'
to_char(21, '000099') would return '000021'
select to_char(col_name,'fm99999.99') from tablename