Beginner

254. ROUND Function

Learn how to round numeric values to a specified number of decimal places.

📘 Lesson 254 of 728 ⏱ 9 min 🎯 Beginner

The ROUND function rounds a numeric value to a specified number of decimal places or precision according to the database system's rules.

Rounding is essential when preparing financial reports, percentages, averages, prices, and other business metrics.

Round average sales to two decimal places.

SQL
SELECT
    ProductName,
    ROUND(UnitPrice, 2) AS RoundedPrice
FROM Products;

ROUND is widely used in financial analysis, reporting, pricing, percentages, and business calculations.

  • ROUND changes numeric precision.
  • The number of decimal places can be specified.
  • It is useful for presentation.
  • Rounding rules can vary slightly by database.
  • It should be applied carefully to financial calculations.
What does ROUND do?

ROUND rounds a numeric value to a specified number of decimal places or precision.

Why is ROUND useful in reporting?

It makes numeric results easier to read and present at an appropriate level of precision.

Have you finished this lesson?

Introduction to SQL – All Lessons