From: doid@my-deja.com
Newsgroups: comp.databases.oracle.server
Subject: Re: char vs. varchar?
Date: Fri, 02 Feb 2001 17:44:47 GMT
Organization: Deja.com
Lines: 30
Message-ID: <95ermc$a8v$1@nnrp1.deja.com>
References: <eS3e6.269797$hD4.65146495@news1.rdc1.mi.home.com>
NNTP-Posting-Host: 199.212.19.130
X-Article-Creation-Date: Fri Feb 02 17:44:47 2001 GMT
X-Http-User-Agent: Mozilla/4.73 [en] (Win98; U)
X-Http-Proxy: 1.0 x64.deja.com:80 (Squid/1.1.22) for client 199.212.19.130
X-MyDeja-Info: XMYDJUIDdoid


Another pertinent difference is that Oracle's comparison semantics are
not the same for CHAR and VARCHAR2.

When you search a VARCHAR2 column, Oracle performs exact comparisons.
If your data differs from the table data because of trailing blanks, the
search will fail.

Searches for CHAR data aren't affected by trailing blanks.

I think I've had more debugging problems because of this one issue than
any other.

Storage is getting cheap (unlike developer time).  For a small (less
than 100 characters, perhaps) character column, I would opt for CHAR.


In article <eS3e6.269797$hD4.65146495@news1.rdc1.mi.home.com>,
  "Tom Weng" <tomweng@home.com> wrote:
> Could somebody explain to me how Oracle store char datatype data vs.
 varchar
> datatype internally?
>
> Whis is the pro/con in-term of performing update on a char column v.s
> varchar column?
>
>


Sent via Deja.com
http://www.deja.com/

