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

Home -> Community -> Usenet -> c.d.o.misc -> Re: CHAR vs VARCHAR

Re: CHAR vs VARCHAR

From: Ed Prochak <edprochak_at_adelphia.net>
Date: Wed, 02 Apr 2003 14:19:37 GMT
Message-ID: <3E8AF55F.60100@adelphia.net>

Not to be critical but a little nitpick here;

SoulSurvivor wrote:
> In short, a char will pad with spaces to make up the space, a varchar will now.
>
> e.g
>
> CHAR(4) stores A as ' A'

CHAR is right padded so this is 'A '

> VARCHAR2(4) stores A as 'A';

but varchar includes the string length in the storage so this is actually more like 1'A'

HTH

-- 
Ed Prochak
running: http://www.faqs.org/faqs/running-faq/
family:  http://web.magicinterface.com/~collins
--
"Two roads diverged in a wood and I
I took the one less travelled by
and that has made all the difference."
robert frost
Received on Wed Apr 02 2003 - 08:19:37 CST

Original text of this message

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