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: varchar2(10) vs. varchar2(10 BYTE)

Re: varchar2(10) vs. varchar2(10 BYTE)

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Mon, 11 Oct 2004 12:18:46 +0200
Message-ID: <ckdm78$1dt$1@news4.zwoll1.ov.home.nl>


Guyon Morée wrote:

> Hi all,
>
>
> When I generate table scripts with TOAD, the script declares the
> varchar2 column size with: varchar2(10 byte) instead of varchar2(10).
> The latter is what I'm used to.
>
> Also this script won't run on every (version of the?) database.
>
> Can someone tell me the difference between the 2?
>
>
> thanks
>
> Guyon Morée
>

BYTE would be the default; the other possibility is CHAR. So, technically, there is no difference between the two (BYTE being default), the difference is in the CHAR option: a character can take more that one byte (up to 3 byte, iirc). Think multibyte character sets.
This option tells a multibyte database (!) to use character semantics when storing data: a varchar2(10) would be able to store 10 characters, in stead of 10 byte worth of characters.

BTW - you can tell TOAD to suppress this...

-- 

Regards,
Frank van Bortel
Received on Mon Oct 11 2004 - 05:18:46 CDT

Original text of this message

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