T-SQL Tutorial

SQL Round


Round Syntax:

SELECT ROUND(column_name,decimal precision)
FROM table_name

Sales table:

IDPRICENAME
125.845A
226.97B
327.9C
428.34D

Round Example 1:

SELECT id, ROUND(price,1)
FROM store;

Round Result:

IDPRICE
125.8
226.9
327.9
428.3

Round Example 2:

SELECT id, ROUND(price,0)
FROM store;

Round Result:

IDPRICE
126
227
328
428