Categories: Numeric

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