2010-10-09 155 views

回答

7

round功能,你可以试试这个

select round(4.584406, 1, 1) 

输出将是

4.5 

关键是第三个参数

ROUND (numeric_expression , length [ ,function ]) 

功能

Is the type of operation to perform. function must be tinyint, 

smallint或int。当函数 省略或值为0(默认值)时, 数值表达式已舍入。 如果指定了 以外的值,则会截断 numeric_expression。

相关问题