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: [Q] Varchar = Char?

Re: [Q] Varchar = Char?

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1997/12/17
Message-ID: <678f2g$tq6$1@news00.btx.dtag.de>#1/1

replace this with @ Martin Jesterhoudt wrote:
>
> Hi,
>
> I've heart that a Char is also written in variable length to the
> database. In that case, it doesn't differ from Varchar. So what's the
> difference? Maybe for compatibility reasons?
> -------------------------------------------------------------------------------
> --- Martin Jesterhoudt
> --- martinj(replace this by @)xs4all.nl
> -------------------------------------------------------------------------------
Hi Martin,

CHAR columns may be from 1 to 255 characters long and the CHAR values are always padded with blanks to the specified length, whereas VARCHAR values can be up to 2000 characters long and are not padded. Oracle recommends to use VARCHAR2 instead of VARCHAR since the meaning of VARCHAR can change in future time.

Let's look at 'Martin':

CHAR(10): 'Martin '
VARCHAR2(10): 'Martin'

-- 
Regards

Matthias Gresz    :-)
Received on Wed Dec 17 1997 - 00:00:00 CST

Original text of this message

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