Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Questions about (n)(var)char(2)
Answers embedded
Hth,
Sybrand Bakker, Oracle DBA
J. Park <johan_park_at_hotmail.com> wrote in message
news:8aih5s$ak2$1_at_weber.a2000.nl...
> I'm learning oracle, i't is going slow
> but I'm making some progress.
> I've been reading about the different datatypes
> and have some questions about the character types.
>
> Question 1:
> The varchar2 and nvarchar2 datatypes are
> variable-length fields, what does that mean ?
> If I make a field 1000 characters long and I
> put only 1 character in it, it would take only 1 character
> in the database instead of 1000 characters ?
Yes and use variable length semantics during comparison
ie
'a ' <> 'a'
>
> Question 2:
> Is there a reason to use char type ? or is it always better
> to use varchar2 type. Are char types faster to index / search ?
>
char only if the length is fixed (postal codes)
No
> Question 3:
> nvarchar2 is for support of multi-byte character set ???
> what does that mean ? is that for support of special
> characters (é, ë, etc....) ?
>
National language support, multibyte is for Japanese, Korean etc. and is a
superset of NLS.
> thanks in advance,
> Johan
>
>
>
Received on Mon Mar 13 2000 - 08:24:00 CST