diff --git a/docs/en/sql-reference/functions/rounding-functions.md b/docs/en/sql-reference/functions/rounding-functions.md index 3ede66cf316..74b68a03820 100644 --- a/docs/en/sql-reference/functions/rounding-functions.md +++ b/docs/en/sql-reference/functions/rounding-functions.md @@ -26,6 +26,37 @@ Returns the smallest round number that is greater than or equal to `x`. In every Returns the round number with largest absolute value that has an absolute value less than or equal to `x`‘s. In every other way, it is the same as the ’floor’ function (see above). +**Syntax** + +```sql +trunc(input, precision) +``` + +Alias: `truncate`. + +**Parameters** + +- `input`: A float type [Float](/docs/en/sql-reference/data-types/float.md). +- `precision`: A decimal type [Decimal](/docs/en/sql-reference/data-types/decimal.md). + +**Returned value** + +- A [Float64](/docs/en/sql-reference/data-types/float.md) value. + +**Example** + +Query: + +```sql +SELECT trunc(123.45, 1) as res; +``` + +```response +┌───res─┐ +│ 123.4 │ +└───────┘ +``` + ## round(x\[, N\]) Rounds a value to a specified number of decimal places.