If you execute *

SELECT
* round((length(13)+0)/2) + 1 FROM DUAL
we will get only 2 bytes as lenth(13) return 2 and add devided by 2 it gives
1 +1 = 2.

If it is 8bytes, then length(13) should not be there.

On Tue, Aug 10, 2010 at 11:05 PM, ddf <orat...@msn.com> wrote:

> Comments embedded.
>
> On Aug 10, 9:43 pm, swaroop gowda <swaroop.t...@gmail.com> wrote:
> > Hi,
> >
> > Can any one please let me know number bytes for NUMBER(13,2) and just for
> > NUMBER data type.
> >
>
> NUMBER(13,2) bytes == round((length(13)+0)/2) + 1 == 8 bytes
> NUMBER bytes == round((length(38)+0)/2)+1 == 20 bytes
>
> General formula: round((length(p)+s)/2)+1, p== precision, s==0 for
> positive numbers, s==1 for negative numbers.  0 and negative infinity
> consume 1 byte; positive infinity consumes 2 bytes.
>
>
>
> > Also I would like to know how to calculate number bytes for each and
> every
> > data type.
>
>
> Start reading here:
>
>
> http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#i16209
>
> >
> > --
> > Thanks & Regards
> > Swaroop Thailuru Swamy
>
>
> David Fitzjarrell
>
> --
>  You received this message because you are subscribed to the Google
> Groups "Oracle PL/SQL" group.
> To post to this group, send email to Oracle-PLSQL@googlegroups.com
> To unsubscribe from this group, send email to
> oracle-plsql-unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/Oracle-PLSQL?hl=en
>



-- 
Thanks & Regards
Swaroop Thailuru Swamy

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to