Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » UltraLite - 数据库管理和参考 » UltraLite SQL 参考 » UltraLite SQL 函数 » SQL 函数 (P-Z)

 

TRUNCNUM 函数 [Numeric]

在小数点后的指定位数截断数字。

语法
{ TRUNCNUM | "TRUNCATE" }( numeric-expression, integer-expression )
参数
  • numeric-expression   要截断的数字。

  • integer-expression   正整数指定小数点右边舍入到的有效位数。负数表达式指定小数点左边舍入到的有效位数。

返回值

NUMERIC

注释

如果任何参数为 NULL,则结果为 NULL。

另请参见
标准和兼容性
  • SQL/2003   服务商扩充。

示例

以下语句返回值 600。

SELECT TRUNCNUM( 655, -2 );

以下语句返回值 655.340。

SELECT TRUNCNUM( 655.348, 2 );