Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

Round

Example

Round the “Price” column to 1 decimal place in the “Products” table.

SELECT ProductName, Price, Round(Price, 1AS RoundedPrice
FROM Products;

Definition and Usage

The Round() function rounds a number to a designated number of decimal places.

Note: When the expression ends with a 5, this function rounds so that the final digit is an even number. For example:

  • Round(34.55, 1) results in 34.6 (rounds up)
  • Round(34.65, 1) results in 34.6 (rounds down)

Syntax

Round(expressiondecimal_places)

Parameter Values

Parameter

Description

expression

Specify the numeric expression to be rounded.

decimal_places

Optional. The number of decimal places to round the expression to. If omitted, the function rounds to the nearest whole number.

Technical Details

WORKS IN

From Access 2000