提交 c3c1212c authored 作者: Thomas Mueller's avatar Thomas Mueller

New system function TRUNCATE_VALUE to truncate a value to the required precision.

上级 ecadb944
--- special grammar and test cases --------------------------------------------------------------------------------------------- --- special grammar and test cases ---------------------------------------------------------------------------------------------
call cast_precision('Test 123', 4, false); call truncate_value('Test 123', 4, false);
> 'Test' > 'Test'
> ------ > ------
> Test > Test
> rows: 1 > rows: 1
call cast_precision(1234567890.123456789, 4, false); call truncate_value(1234567890.123456789, 4, false);
> exception > exception
call cast_precision(1234567890.123456789, 4, true); call truncate_value(1234567890.123456789, 4, true);
> 1234567890.1234567 > 1234567890.1234567
> ------------------ > ------------------
> 1234567890.1234567 > 1234567890.1234567
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论