Skip to content

Commit dc9dae9

Browse files
committed
round off
1 parent 10224e8 commit dc9dae9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

5. RoundOff.sql

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- ROUND(number, decimals, operation)
2+
3+
4+
-- it will round off to the nearest integer.
5+
select round(avg(POPULATION)) from CITY;
6+
7+
-- it will round off to the nearest 2 decimal places
8+
select round(avg(POPULATION),2) from CITY;

0 commit comments

Comments
 (0)