# round

Returns the value of the specified number, rounded to the specified number of decimal places.

## Syntax

`round(number, decimal_places)`

## Parameters

• number – is any exact numeric (numeric, dec, decimal, tinyint, smallint, int, or bigint), approximate numeric (float, real, or double precision), or money column, variable, constant expression, or a combination of these.
• decimal_places – is the number of decimal places to round to.

## Examples

• Example 1 – Returns the value of 123.4545, rounded to 2 decimal places:
`select round(123.4545, 2)`
```----------
123.4500 ```
• Example 2 – Returns the value of 123.45, rounded to -2 decimal places:
`select round(123.45, -2)`
```----------
100.00 ```
• Example 3 – Returns the value of 1.2345E2, rounded to 2 decimal places:
`select round(1.2345E2, 2)`
```-----------------
123.450000```
• Example 4 – Returns the value of 1.2345E2, rounded to -2 decimal places:
`select round(1.2345E2, -2)`
```-----------------
100.000000```

## Usage

• round, a mathematical function, rounds the number so that it has decimal_places significant digits.

• A positive value for decimal_places determines the number of significant digits to the right of the decimal point; a negative value for decimal_places determines the number of significant digits to the left of the decimal point.

• Results are of the same type as number and, for numeric and decimal expressions, have an internal precision equal to the precision of the first argument plus 1 and a scale equal to that of number.

• round always returns a value. If decimal_places is negative and exceeds the number of significant digits specified for number, the SAP ASE server returns 0. (This is expressed in the form 0.00, where the number of zeros to the right of the decimal point is equal to the scale of numeric.) For example, the following returns a value of 0.00:
`select round(55.55, -3)`

## Standards

ANSI SQL – Compliance level: Transact-SQL extension.

## Permissions

Any user can execute round.

Related reference
abs
ceiling
floor
sign
str