Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: char vs. varchar?
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_at_news1.rdc1.mi.home.com>,
"Tom Weng" <tomweng_at_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/
Received on Fri Feb 02 2001 - 11:44:47 CST
![]() |
![]() |