Categories: Math
BROUND
Returns the rounded value using banker's rounding (HALF_EVEN). When the input is exactly halfway between two integers, rounds to the nearest even number. Returns NULL if the input is NULL.
Syntax
BROUND(numeric_expression double) → double
- numeric_expression: The
DOUBLEvalue to round using banker's rounding.
Examples
BROUND exampleSELECT BROUND(50.2), BROUND(50.5), BROUND(50.55), BROUND(-50)
-- 50.0, 50.0, 51.0, -50.0
SELECT BROUND(2.5)
-- 2.0
SELECT BROUND(3.5)
-- 4.0
SELECT BROUND(2.4)
-- 2.0
SELECT BROUND(-2.5)
-- -2.0