Difference between NLS_NCHAR_CHARACTERSET and NLS_CHARACTERSET for Oracle

I have a quick question here, what would I like to know the difference between NLS_NCHAR_CHARACTERSET and NLS_CHARACTERSET in oracle ??

from my understanding NLS_NCHAR_CHARACTERSET is for NVARCHAR data types and for NLS_CHARACTERSET is for VARCHAR2 data types.

I tried to check this on my development server, for which my current settings for CHARACTERSET are as follows: -

PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_NCHAR_CHARACTERSET         AL16UTF16
NLS_NUMERIC_CHARACTERS         .,
NLS_CHARACTERSET               US7ASCII

Then I entered some Chinese signed values ​​into the database. I inserted characters into a table called data_ and updated the column for ADDRESS and ADDRESS_2, which are VARCHAR2 columns. In my understanding, with the current setting for NLS_CHARACTERSET US7ASCII, Chinese characters should not be supported, but are they still displayed in the database? Does NLS_NCHAR_CHARACTERSET take precedence over this?

Thank.

+8
source share
1 answer

In general, all your points are correct. NLS_NCHAR_CHARACTERSETdefines the character set for NVARCHAR2, et. and other columns, while NLS_CHARACTERSETused for VARCHAR2.

Why do you see Chinese characters with US7ASCII?

, ( . NLS_LANG) US7ASCII. US7ASCII, "", , US7ASCII. , , .

, US7ASCII. , (, ODP.NET Windows), ! , , .

: , , WE8ISO8859P1, . , US7ASCII, NLS_LANG US7ASCII ( , , Oracle US7ASCII), SQL * Plus, . cmd.exe, , CP950 CP936.

, NLS_LANG=.ZHT16MSWIN950 (CP936, , Oracle) sqlplus.exe chcp 437. , , , .

+7

All Articles