Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: varchar(2) use
On 16 May 1997 19:10:49 GMT, yogitat_at_aol.com (YogitaT) wrote:
>can we use varchar2 if it is varchar2(1) and 100 or more such columns in
>our table instead of char(1) . Actually I want to know overhead defining
>column as varchar instead of char which is fixed.
>thanks
A char is a varchar that is blank padded to a maximum length.
a char(5) will always take either 0, 1 or 6 bytes,
a varchar2(5) will take somewhere between 0 and 6 bytes depending on the data.
In the case of a varchar2(1) and a char(1), it would really be 6 one way, 1/2 dozen the other... they will be the same.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD
http://govt.us.oracle.com/ -- downloadable utilities