数据库信息:oracle 11g linux系统环境下
Sql:
SELECT SYSDATE,123.456 AS AMT,ROUND(123.456*0.1,5) AS AMT1
FROM DUAL
WHERE 1=1
查询结果: 显示不显示小数位(如图ERROR.JPG)
但是在ORACLE11G AIX 系统下正常(如图OK.JPG)
后台PL/SQL中执行都一样,如下:
SELECT SYSDATE,123.456 AS AMT,ROUND(123.456*0.1,5) AS AMT1
,TO_CHAR(ROUND(123.456*0.1,5)) AS TO_CHAR_AMT1
FROM DUAL
WHERE 1=1;
查询结果都如下,是一致的:
SYSDATE AMT AMT1 TO_CHAR_AMT1
2012-9-29 19:41:22 123.456 12.3456 12.3456