将Oracle的字符集由AMERICAN_AMERICA.ZHS16GBK修改为SIMPLIFIED CHINESE_CHINA.ZHS16GBK

1. 查询当前字符集:

select userenv('language') from dual;

USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK

发现是 AMERICAN_AMERICA. 现在把它改成
2. 修改Oracle用户环境变量

vim ~/.bash_profile

export NLS_LANG="SIMPLIFIED CHINESE_CHINA".ZHS16GBK
:wq

source ~/.bash_profile

3. 再查询字符集

SQL> select userenv('language') from dual;

USERENV('LANGUAGE')
--------------------------------------------------------------------------------
SIMPLIFIED CHINESE_CHINA.ZHS16GBK

已改为SIMPLIFIED CHINESE_CHINA

完了

你可能感兴趣的:(字符集CHINESE,oracle)