Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: result precision and scale of the arithmentic expressions and aggregate functions

Re: result precision and scale of the arithmentic expressions and aggregate functions

From: Lan Huang <lanegroups_at_go.com>
Date: 30 Jun 2003 10:55:05 -0700
Message-ID: <48e0b0fb.0306300955.e3a6634@posting.google.com>


Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl> wrote in message news:<3i9pfv821h2mt5lrm4lclq949i0s69clni_at_4ax.com>...
> On 27 Jun 2003 10:18:46 -0700, lanegroups_at_go.com (Lan Huang) wrote:
>
> >I'd like to know what's the result precision and scale of the decimal
> >arithmentic expression and aggregate function.
> >
> >For example, what's the result type of
> >decimal(p1, s1)+decimal(p2, s2)
> >decimal(p1, s1)-decimal(p2, s2)
> >decimal(p1, s1)*decimal(p2, s2)
> >decimal(p1, s1)/decimal(p2, s2)
> >AVG(decimal(p1, s1))
> >etc
>
> the result type of a number function is simply number, which means
> number(38)
>
> >
> >I tested several cases in Oracle, the scales of the results are 9 in
> >all the cases I tried. For example, 1/3 returns .999999999 from
> >Oracle. Is 9 always the maximal scale Oracle returns?
>
> definitely not. What you see is always subject to format masks.
Is there a way to show the numbers in all the precision & scale?

> >
> >It will also be nice if someone tell me which documentation describes
> >the result types of the expressions and functions.
>
> That is most likely described in the sql reference manual.
>

Which section should it be in? I searched Oracle9i SQL Reference, but couldn't find such descriptions.

> >
> >Thanks,
> >Lan
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
Received on Mon Jun 30 2003 - 12:55:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US