Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Andrew.

Asked: September 04, 2015 - 3:00 pm UTC

Last updated: February 25, 2020 - 8:20 am UTC

Version: 12.0.2

Viewed 50K+ times! This question is

You Asked

In a database with character sets defined as:
NLS_CHARACTERSET = AL32UTF8
NLS_NCHAR_CHARACTERSET = UTF8

Would there be any difference in the (language) character sets that could be stored by VARCHAR2 Vs. NVARCHAR2? As in

NAME VARCHAR2(60 CHAR)
Vs.
NAME NVARCHAR2(60 CHAR)

and Chris said...

NVARCHAR2 is a unicode-only data type. It's useful if you want to have unicode for some columns (those that are NVARCHAR2) but have the rest of the database use a different characterset. In all other cases stick with using VARCHAR2.

In your case the only difference between UTF8 and AL32UTF8 is the AL version includes "supplementary characters".

See also:

http://www.oracle.com/technetwork/database/database-technologies/globalization/twp-appdev-unicode-10gr2-129234.pdf

and

http://docs.oracle.com/database/121/NLSPG/ch6unicode.htm#NLSPG006

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Nvarchar2 vs Varchar2

Alok, February 24, 2020 - 6:08 am UTC

What if I have Varchar2 data type and i will tryto insert mutibyte character
NLS_CHARACTERSET = AL32UTF8 is in my database
Connor McDonald
February 25, 2020 - 8:20 am UTC

If your database characterset is UTF8 or similar, then you can store all of the extended characters in normal varchar2 columns