Revision
So you think you can count
Round and other functions
16. Problems with round
Revision 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.

Console

Code editor

Result

TableConsole