SQL ROUND() Function

The ROUND() Function

The ROUND() function is used to round a numeric field to the number of decimals specified.

SQL ROUND() Syntax

SELECT ROUND(column_name,decimals) FROM table_name;

 

Parameter Description
column_name Required. The field to round.
decimals Required. Specifies the number of decimals to be returned.

Example

SELECT ProductName, ROUND(Price,0) AS RoundedPrice
FROM Products;

No comments yet.

Leave a Reply

*