ROUND Function
Predict Output Easy
Question
What does this SQL produce?
Code
-- value: 3.14159
SELECT ROUND(3.14159, 2);
Hint
ROUND(x, 2) rounds to 2 decimal places.
Explanation
ROUND(3.14159, 2) rounds the number to 2 decimal places: 3.14. The second argument specifies the number of decimal places. ROUND(x) without a second argument rounds to 0 decimal places (nearest integer).
Related Resources
Related Lessons
- Aggregations
Learn aggregations.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.