FirebirdSQL logo

ROUND Examples

If the scale argument is present, the result usually has the same scale as the first argument:

ROUND(123.654, 1) -- returns 123.700 (not 123.7)
ROUND(8341.7, -3) -- returns 8000.0 (not 8000)
ROUND(45.1212, 0) -- returns 45.0000 (not 45)

Otherwise, the result scale is 0:

ROUND(45.1212) -- returns 45

SIGN()

Sign or signum

Result type

SMALLINT

Syntax
SIGN (number)
Table 1. SIGN Function Parameter
Parameter Description

number

An expression of a numeric type

Returns the sign of the argument: -1, 0 or 1

  • number < 0-1

  • number = 00

  • number > 01