Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Estimate row length and INT to NUMBER(38)
In article <8armit$jnt$1_at_web1.cup.hp.com>,
"Maggie" <maggiezhou_at_hotmail.com> wrote:
> One of developer in my company generated Sequence number from 1
increment
> with 1 and define sequence as INT. However, Oracle convert INT to
> NUMBER(38). I try to estimate the table size. I dont know how to
> calculate the row length becasue number is variable-length data type
and the
> sequence generated only occupy serveral digits but it show as NUMBER
(38).
> This developer defined many columns as INT and finally he got many
> NUMBER(38) length columns. Do I need ask him to change his table
> definition?
>
Oracle normally publishes the formula for calculating the internal
storage of a number datatype in the Concepts Manual.
It is something like 1 for the exponent + (floor( digits/2 ) + 1) + 1 for the sign but I believe the sign is only required when negative. Check the manual if you really need to be exact.
Personally I prefer to declare my tables as number(precision,scale).
-- Mark D. Powell -- The only advice that counts is the advice that you follow so follow your own advice -- Sent via Deja.com http://www.deja.com/ Before you buy.Received on Fri Mar 17 2000 - 00:00:00 CST
![]() |
![]() |