Numbers & math
Scalar
round_even()
Rounds x to s decimal places, rounding halfway cases to the nearest even digit
Reference: DuckDB 2.0.0
Arguments & returns
8 overloadsround_even(x, precision)
Scalar
Example
Haybarn WASM 2.0.0-rc12 ยท In your browser
Engine example ยท Run to view results.
In other engines
BigQueryround()
SELECT ROUND(NUMERIC '2.25', 1, 'ROUND_HALF_EVEN') AS value
SELECT ROUND_EVEN(CAST('2.25' AS DECIMAL), 1) AS value
Snowflakeround()
SELECT ROUND(2.25, 1, 'HALF_TO_EVEN') AS value
SELECT ROUND_EVEN(2.25, 1) AS value