Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: char vs. varchar
to the best of my knowledge, the difference between storage
of char and varchar is that if you have a field that is a char(20),
then if you store 1 character in it, Oracle will store 19 spaces
after that... Essentially giving you a fixed-length field. If you use
a varchar(20), and store 1 character, Oracle only maintains
the 1 character, and an internal indicator as to the size of the
'actual' data in the varchar field.
Unless you know that every record is going to have a fixed-length,
same-size field, and you're not just storing single-character data (like 'Y'
or 'N'),
then I'd recommend sticking with varchar2.
Received on Wed Jan 06 1999 - 11:57:15 CST