Ceiling Function in SQL

Level 117 keystrokes

CEIL function rounds a number up to the nearest integer.

SQL code

-- CEIL always rounds up to the next higher integer
-- 2.1 becomes 3 (ROUND would give 2)
1SELECT CEIL(2.1);

Output

+-----------+
| CEIL(2.1) |
+-----------+
|         3 |
+-----------+
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