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 -> result precision and scale of the arithmentic expressions and aggregate functions

result precision and scale of the arithmentic expressions and aggregate functions

From: Lan Huang <lanegroups_at_go.com>
Date: 27 Jun 2003 10:18:46 -0700
Message-ID: <48e0b0fb.0306270918.61ae0ca3@posting.google.com>


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

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?

It will also be nice if someone tell me which documentation describes the result types of the expressions and functions.

Thanks,
Lan Received on Fri Jun 27 2003 - 12:18:46 CDT

Original text of this message

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