Re: NUMERIC DATA SIZES?

From: Rod Corderey <Lane_Associates_at_compuserve.com>
Date: Sun, 03 May 1998 08:21:10 +0100
Message-ID: <354C1AE6.D854C817_at_compuserve.com>


John

no doubt you have had an answer from elsewhere by now, but have you considered the SQL function vsize.

vsize returns the number of bytes in the internal representation. So if a numeric value in a table is 4578123 for example, then select vsize(column_name) from table_name would return a value of 5. [ In Oracle v 7.3 ]

vsize can be used for numeric or char attributes.

regards

Rod Corderey

Lane Associates
Lane_Associates_at_Compuserve.com
http://www.Lane-Associates.com

John Taylor wrote:
>
> Thankyou to all those who have helped me in the past.
> Can anybody tell me the internal sizes of the following:
>
> NUMBER
>
> NUMBER(2)
>
> NUMBER(8)
>
> SMALLINT
>
> INTEGER
>
> ORACLE Support tell me they only use one numeric data type (unlike
> Btrieve for instance). When I asked ORACLE to describe a table with
> INTEGERS in, they were all 'described' as NUMBER(38). One of my
> colleagues wrote a program to work out the field size when entered into
> a Delphi DBGrid. I was a little concerned when NUMBER(2) showed up as 8
> bytes - but when I ran it on a table with INTEGERs they showed up as
> having a size of 34 bytes! The datatype claimed was that of BCD -
> binary-coded decimal. I desperately need to find out the exact size as I
> may well have underestimated the size of my tablespaces.
>
> Cheers,
>
> John Taylor (john_hamilton.taylor_at_virgin.net)
Received on Sun May 03 1998 - 09:21:10 CEST

Original text of this message