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: Jaap W. van Dijk <j.w.vandijk.removethis_at_hetnet.nl>
Date: Mon, 29 Jul 2002 19:32:05 GMT
Message-ID: <3d45972c.497596@news.jaapwvandijk.myweb.nl>


On Sun, 28 Jul 2002 22:07:10 GMT, "Marco Muracchioli" <reply.on_at_group.please> wrote:

...
>This mean that if you insert 'UGO' in a char(6) field, the result is 'UGO___'
>with 3 spaces at end; if you do the same in a varchar one, the result is 'UGO'
>with no spaces at end.
>With varchar type trailing spaces are removed.
...

This is NOT true for varchar2. For instance, if you assign 'UGO_' to a varchar2 field, the stored value will be 'UGO_'. The field is not padded with trailing spaces, but neither are trailing spaces removed.

Jaap. Received on Mon Jul 29 2002 - 14:32:05 CDT

Original text of this message

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