Prev Next
SQL ROUND() function is used to round a numeric value to the nearest integer or to the number of decimals specified by the user. Syntax for SQL ROUND() function is given below.
SQL Syntax for ROUND() function:
| Syntax for ROUND() function in SQL | SELECT ROUND(column_name, decimals) FROM table_name; |
Where,
- Column_name – It is the column name whose value to be rounded. It’s a mandatory field.
- Decimal – It specifies the number of decimals to be returned. It’s a mandatory field.
Please consider the following table with few records as given below.
Table name (for example): student
Column names in this table: Student_ID, Student_name, City and Marks
Available records: 4 rows
