ROUND function ?? - Mailing list pgsql-sql

From Saurabh Mittal
Subject ROUND function ??
Date
Msg-id OE25NZwwPcMFlF8HGmC0000b0ea@hotmail.com
Whole thread Raw
Responses Re: ROUND function ??  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Hi,
 
select ROUND(0.5) ; returns 0
select ROUND(1.5) ; returns 2;
select ROUND(2.5) ; returns 2;
select ROUND(3.5) ; returns 4;....so on .
I'm sure you would have figured out what's happening !!! Why ??
How do I get to approximate any number x.5 as x+1 ??
 
Saurabh
 

pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: SQL-Programmer tool and field%type support
Next
From: Tom Lane
Date:
Subject: Re: SQL-Programmer tool and field%type support