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: Picking CHAR over VARCHAR2

Re: Picking CHAR over VARCHAR2

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 25 Feb 1999 20:34:56 GMT
Message-ID: <36d6b3c4.2746158@192.86.155.100>


A copy of this was sent to "Jeff Hunter" <jeffh_at_btitelecom.net> (if that email address didn't require changing) On Thu, 25 Feb 1999 09:23:59 -0800, you wrote:

>In addition, a varchar2 carries overhead for the length portion of the
>field. Granted, it is only a small portion. I generally use a char
>datatype for fields <= 5 chars and varchar2 for fields > 5 chars.
>

a char is a varchar that is blank padded. A char has the leading length field as well. No space savings or difference for a char(1) and a varchar2(1) -- they consume the same space....

>Doug Cowles wrote in message <36D41A43.F3E7D82B_at_bigfoot.com>...
>>Char has padded space, making string matches more difficult. So why
>>would I pick
>>a Char over a VARCHAR2 even if it was only one character?
>>
>
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Feb 25 1999 - 14:34:56 CST

Original text of this message

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