Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: VARCHAR2(1) vs CHAR(1)

Re: VARCHAR2(1) vs CHAR(1)

From: Marco Muracchioli <reply.on_at_group.please>
Date: Mon, 29 Jul 2002 21:25:51 GMT
Message-ID: <zpi19.155593$vm5.5228782@news2.tin.it>


From Oracle8 complete reference:

CHAR(size) Fixed-length character data, "size" character long. Maximum size

                is 2000. Default 1 byte. Padded on the right with blanks to
full
                length of size.

VARCHAR2(size) Variable length character string having a maximum of "size" bytes
                (up to 4000).

VARCHAR(size) Same as varchar2. Use varchar2, since varchar's usage may change
                in future version of Oracle.

This is my reference. Where you find that data are stored in the same way (size then data and not only data for char)? This is not polemic, just a new information for me too.

Thanks,
Marco

> You'll find that char(n) and varchar2(n) are implemented (ie stored) in
> exactly the same way, ie, length and data are stored. The argument
> between them is if you want the data padded out with spaces (which I
> would say is rare unless you have a requirement for fixed length rows to
> improve storage management)
Received on Mon Jul 29 2002 - 16:25:51 CDT

Original text of this message

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