SQL里Round函数如何使用?

SQL里Round函数如何使用?


隔江千里
浏览 741回答 1
1回答

慕田峪9158850

SQL取整函数ROUND的用法ROUND ( numeric_expression , length [ , function ] )参数numeric_expression精确数字或近似数字数据类型类别的表达式(bit 数据类型除外)。length是 numeric_expression 将要四舍五入的精度。length 必须是 tinyint、smallint 或int。当 length 为正数时,numeric_expression 四舍五入为 length 所指定的小数位数。当 length 为负数时,numeric_expression 则按 length 所指定的在小数点的左边四舍五入。function是要执行的操作类型。function 必须是 tinyint、smallint 或 int。如果省略 function 或 function 的值为 0(默认),numeric_expression 将四舍五入。当指定 0 以外的值时,将截断 numeric_expression。
打开App,查看更多内容
随时随地看视频慕课网APP