Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Regarding Numer(p,s)
Udhaya wrote:
> Dear All,
>
> As per Oracle document in Number(p,s)
>
> P is the total number of digits which range from 1 to 38 and
>
> S is Scale which range from -84 to 127
>
> Number (7,2) mean total number of digits is 7 and i can have 2 digits
> eight to the decimal.
>
> Then how can i use the maximum range like Number(38,127)
>
> which means i can have totally 38 digits and 127 digits right to the
> decimal..
>
> I think i am missing the Flaoting Pint algoritham...
>
> Please let me clear this..
>
> Regards
>
> Udhaya
Quote from the SQL Reference:
-- You can specify a scale that is greater than precision, although it is uncommon. In this case, the precision specifies the maximum number of digits to the right of the decimal point. As with all number datatypes, if the value exceeds the precision, then Oracle returns an error message. If the value exceeds the scale, then Oracle rounds the value. -- This means, that if scale is greater than precision, then represented number always is less than 1. For example, NUMBER(38,127) can't take values larger than 1E-90 (1 * 10^-90). Hth, Vladimir M. Zakharychev N-Networks, makers of Dynamic PSP(tm) http://www.dynamicpsp.comReceived on Wed Jul 05 2006 - 01:29:04 CDT