Re: char vs varchar2

From: Matt B. <mcb_at_fightspam.sd.znet.com>
Date: 2000/07/01
Message-ID: <slsg8fmhop3145_at_corp.supernews.com>#1/1


[Quoted] "Thomas J. Kyte" <tkyte_at_us.oracle.com> wrote in message news:8jkv38$489$1_at_nnrp1.deja.com...
>A 'small' character field is one that has a length of <= 250 characters.
[Quoted] Anything else is considered as a 'long' character type.

??? (Confused...)

What about VARCHAR2(2000) (Oracle 7 I believe) and VARCHAR2(4000) (Oracle 8) [Quoted] datatypes/lengths that you can create as part of a table? And in PL/SQL, a [Quoted] VARCHAR2 can be up to 32767 in length? These aren't called "LONG", right? [Quoted] They're still some form of VARCHAR, aren't they?

-Matt

>
> o Small Character
>
> 1 byte for column length, followed by the data. Eg,
>
> 03 nn nn nn
>
> o Long Character
>
> 1 flag byte to tell us its "big", the next two bytes are used to
> store the *actual* length, and then followed by data. Eg,
>
> fe 01 34 nn nn nn
>
>
> a char(1) and varchar2(1) are stored the same.
>
>
> > >
> > > gi <gi_at_england.com> wrote in message
> > > news:nlZ65.2368$Dr3.145427_at_monolith.news.easynet.net...
> > > > Can someone tell me ...but who really knows
> > > > if I have filled with length is there any difference if I use char
 (1) or
> > > > varchar2(1)
> > > > I read somewhere that char is there only because COBOL programs
 but
 I'm
 not
> > > > sure is that true
> > > > Thanks
> > > >
> > > >
> > >
> > >
> >
> > --
> > Sybrand Bakker, Oracle DBA
> >
> > All standard disclaimers apply
> > ----------------------------------------------------------------------
 --
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> --
> Thomas Kyte (tkyte_at_us.oracle.com) Oracle Service Industries
> Howtos and such: http://osi.oracle.com/~tkyte/index.html
> Oracle Magazine: http://www.oracle.com/oramag
> Opinions are mine and do not necessarily reflect those of Oracle Corp
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sat Jul 01 2000 - 00:00:00 CEST

Original text of this message