Categories: Math

ROUND

Returns the rounded value for the inputted value. If no scale is specified, the closest whole number is returned.

Syntax

ROUND(numeric_expression decimal(0,0), scale int32) â†’ decimal(0,0)

• numeric_expression: Numeric value to round.
• scale: The decimal place to round.

Examples

``````SELECT ROUND(-24.35, -1)
-- -24.4
``````
``````SELECT ROUND(24.35, 1)
-- 24.4
``````

ROUND(numeric_expression int32, scale int32) â†’ int32

• numeric_expression: Numeric value to round.
• scale: The decimal place to round.

Examples

``````SELECT ROUND(24, 0)
-- 0
``````
``````SELECT ROUND(-24, -1)
-- -20
``````

ROUND(numeric_expression int32) â†’ int32

• numeric_expression: Numeric value to round.

Examples

``````SELECT ROUND(24)
-- 24
``````

ROUND(numeric_expression double) â†’ double

• numeric_expression: Numeric value to round.

Examples

``````SELECT ROUND(24.35)
-- 24
``````

ROUND(inputHolder decimal(0,0)) â†’ decimal(0,0)

• inputHolder: sample parameter description

Examples

``````sample call 1
-- sample return 1
``````

ROUND(in float) â†’ float

• in: sample parameter description

Examples

``````sample call 1
-- sample return 1
``````

ROUND(in int64) â†’ int64

• in: sample parameter description

Examples

``````sample call 1
-- sample return 1
``````

ROUND(input1 int64, input2 int32) â†’ int64

• input1: sample parameter description
• input2: sample parameter description

Examples

``````sample call 1
-- sample return 1
``````

ROUND(input1 double, input2 int32) â†’ double

• input1: sample parameter description
• input2: sample parameter description

Examples

``````sample call 1
-- sample return 1
``````

ROUND(numeric_expression float, input2 int32) â†’ float

• numeric_expression: sample parameter description
• input2: sample parameter description

Examples

``````sample call 1
-- sample return 1
``````