0
0
SQLquery~5 mins

ROUND, CEIL, FLOOR in SQL - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the ROUND function do in SQL?
ROUND rounds a numeric value to the nearest integer or to a specified number of decimal places.
Click to reveal answer
beginner
How does the CEIL function behave in SQL?
CEIL returns the smallest integer greater than or equal to the given number. It always rounds up.
Click to reveal answer
beginner
What is the purpose of the FLOOR function in SQL?
FLOOR returns the largest integer less than or equal to the given number. It always rounds down.
Click to reveal answer
beginner
How would you round the number 3.14159 to 2 decimal places using SQL?
Use ROUND(3.14159, 2) which returns 3.14.
Click to reveal answer
beginner
If you apply CEIL to 4.2 and FLOOR to 4.8, what are the results?
CEIL(4.2) returns 5, FLOOR(4.8) returns 4.
Click to reveal answer
What does ROUND(5.678, 1) return?
A6
B5.6
C5.7
D5
Which function always rounds a number up to the nearest integer?
AFLOOR
BCEIL
CTRUNC
DROUND
What is FLOOR(7.9)?
A7
B8
C7.9
D0
Which function would you use to round 2.5 to the nearest integer?
AROUND
BFLOOR
CCEIL
DABS
What does CEIL(-3.7) return?
A-4
B3
C-3.7
D-3
Explain the difference between ROUND, CEIL, and FLOOR functions in SQL.
Think about how each function treats decimal numbers.
You got /3 concepts.
    How would you use these functions to handle the number 5.3 in different ways?
    Consider rounding up, down, or to nearest.
    You got /3 concepts.