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: number vs. number(4)

Re: number vs. number(4)

From: Peter J. Holzer <hjp-usenet_at_SiKitu.wsr.ac.at>
Date: Thu, 25 Jan 2001 14:52:50 +0100
Message-ID: <slrn970bti.rr.hjp-usenet@teal.h.hjp.at>

On 2001-01-24 01:38, Howard J. Rogers <howardjr_at_www.com> wrote:
>Unqualified number fields are up to 38 digits in length (and hence
>approximately 38 bytes variable),

Are you sure? The output from dump looks like numbers are stored as variable length objects:

SQL> desc foo

 Name                                      Null?    Type
 ----------------------------------------- -------- -----------
 I                                                  NUMBER(38)

SQL> select i from foo;

         I


         1
 123456789

SQL> select dump(i) from foo;

DUMP(I)



Typ=2 Len=2: 193,2
Typ=2 Len=6: 197,2,24,46,68,90

The number 1 seems to take 2 bytes, and the number 123456789 seems to take 6 bytes. Or am I misinterpreting the dump() function?

        hp

-- 
   _  | Peter J. Holzer    | All Linux applications run on Solaris,
|_|_) | Sysadmin WSR       | which is our implementation of Linux.
| |   | hjp_at_wsr.ac.at      | 
__/   | http://www.hjp.at/ |	-- Scott McNealy, Dec. 2000
Received on Thu Jan 25 2001 - 07:52:50 CST

Original text of this message

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