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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Questions about (n)(var)char(2)

Re: Questions about (n)(var)char(2)

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 13 Mar 2000 15:24:00 +0100
Message-ID: <952959278.17357.0.pluto.d4ee154e@news.demon.nl>


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

Original text of this message

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