Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: VARCHAR: characters or bytes?

Re: VARCHAR: characters or bytes?

From: Randy DeWoolfson <randy_at_euclidsys.com>
Date: 2000/05/09
Message-ID: <39184CAB.910CB2E7@euclidsys.com>#1/1

I always assumed characters... No proof though.

varchar2 you could just make it ~very~ large compared to your data (like x3) and not worry since the database will trim unused string storage. watch out for

pctfree though.

Randy

Art Decco wrote:

> When you define a field as a varchar(24), does that give it room for up to
> 24 bytes of text data, or does it give it room for up to 24 characters of
> data? After all, not all encodings are single-byte.
>
> In particular, we're thinking of using a UTF-8 (Unicode) database to hold
> global customer data. We're converting the data from a previous, non-Unicode
> encoding. (Actually several databases, and several different encodings.) We
> don't want the data to overflow the field when converted, nor do we want the
> new field to be too narrow for new data. If a column has type varchar with a
> width of 24 and we convert it to UTF-8 using the same schema, that would
> only be enough room for about eight Japanese kanji in UTF-8 if varchar is
> measured in bytes, but it would be plenty if 24 referred to characters
> instead of bytes. Does anybody know for sure which it is? I've heard lots of
> opinions, but nobody seems to really know.
>
> Thanks.
Received on Tue May 09 2000 - 00:00:00 CDT

Original text of this message

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