Round Number in SQL

Level 118 keystrokes

ROUND function rounds a number to the nearest integer.

SQL code

-- ROUND without a second argument rounds to the nearest integer
-- 3.7 is closer to 4, so this returns 4
1SELECT ROUND(3.7);

Output

+------------+
| ROUND(3.7) |
+------------+
|          4 |
+------------+
1 row in set
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this SQL code and how often they appear.

  • ;× 1
  • .× 1
  • (× 1
  • )× 1

More SQL examples at level 1

← SQL typing practice