Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Reviewing SQL and numbers
So you think you can count
Round and other functions
16. Problems with round()
Review and practice

Instruction

Nice job! Before we move on, you need to know that function round(x, precision) differs among the databases. In most of them (MySQL, SQL Server, Oracle) it works with every number type – integer, double precision, numeric, etc.

But in our database – PostgreSQL, if you want to round a number with precision to a specific decimal place, the number being rounded must be a numeric (decimal) type.

Exercise

Try it out yourself. Try to round height to 2 decimal places.