Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

Oracle database is divided into database character set and client character set two kinds!

The database character set is specified when the database is created. It is not recommended to change it! The client character set can be changed at any time!

SQL > alter database character set;

select * from nls_database_parameters t where t.parameter in ('NLS_CHARACTERSET'.'NLS_NCHAR_CHARACTERSET');
Copy the code

To query the client character set:

SELECT USERENV('language') FROM DUAL;
Copy the code

How do I modify the client character set?

Windows:

set NLS_LANG=american_america.AL32UTF8
set NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
Copy the code

Linux:

export NLS_LANG=american_america.AL32UTF8
export NLS_LANG="SIMPLIFIED CHINESE_CHINA".ZHS16GBK
Copy the code

The above is the common client character set, one is English, one is Chinese!


This is the end of sharing ~

If you think the article is helpful to you, please like it, favorites it, pay attention to it, comment on it, and support it four times with one button. Your support is the biggest motivation for my creation.

❤️ technical exchange can follow the public number: Lucifer think twice before you do ❤️