ROUND function ??

From: "Saurabh Mittal" <lattim(at)hotmail(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: ROUND function ??
Date: 2001-10-09 03:45:42
Message-ID: OE25NZwwPcMFlF8HGmC0000b0ea@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dan Wilson 2001-10-09 04:04:24 Re: PEAR Problem
Previous Message Josh Berkus 2001-10-08 23:08:05 Re: SQL-Programmer tool and field%type support