Home:ALL Converter>Rounding DOWN postgresql

Rounding DOWN postgresql

Ask Time:2022-12-10T10:33:16         Author:sabu monkey

Json Formatter

Here is a example query, I've been trying to find a workaround for this but my knowledge for postgresql at this time is still limited. Thanks in advance.

Sample Query:

select round(3.041,2) as column

Expected Output:

3.03 instead of 3.04

Rounding UP works but I need it to round DOWN as well if the decimal value is <5.

Author:sabu monkey,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/74749947/rounding-down-postgresql
yy