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: VARCHAR length

Re: VARCHAR length

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Wed, 9 Oct 2002 03:54:12 +1000
Message-ID: <iREo9.48807$g9.140436@newsfeeds.bigpond.com>


I hope you're not claiming that CHAR datatypes don't use length bytes?

They do.

Regards
HJR "Karsten Farell" <kfarrell_at_medimpact.com> wrote in message news:OUEo9.1522$qr6.192908583_at_newssvr13.news.prodigy.com...
> Eino Komsi wrote:
> > hi,
> >
> > Is there a difference between VARCHAR(100), VARCHAR(300) or
> > VARCHAR(2000).
> >
> > I mean, is there really a difference if I have 140Gt of hard disk
> > space, and I specify a field to be 300 instead of possible 2000.
> > Performance?
> >
> > regards,
> > Eino Komsi
>
> Not much difference to Oracle - it stores the length and actual
> characters (no right padding). Could be confusing to developers,
> depending on context - how many characters do I allow for in an input
> field or in a (wrapped?) report column? Have you ever displayed some of
> those mega-lengthy fields in sqlplus (which is why I used TOAD)?
>
> However, a pet peeve of mine is that people sometimes claim VARCHAR2 is
> better than CHAR, so they make a status field VARCHAR2(1). I wonder why
> they feel the need to store a length byte and a one-byte column? Oh
> well, maybe they do it so their datatypes all line up in the create
> table command. And maybe it's just my bias because I grew up in the days
> when disk space was scarce and expensive.
>
Received on Tue Oct 08 2002 - 12:54:12 CDT

Original text of this message

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