Overview
TheROUND()
function rounds numbers using round half to even method (bankers rounding).
Syntax
The following illustrates the syntax of theROUND()
function:
number
: The number to round, it can be positive, negative, or zero, and it can be an Integer or a Double Precision.
Examples
Let’s explore some examples to see how theROUND()
function works.
Case #1: Basic Usage
In this example, we round decimal numbers to integers:Case #2: Using ROUND
with Table
Suppose you have a table named Product that stores product prices with multiple decimal places. You want to round the prices.
ROUND()
function to round the Price column when retrieving the data.