ZHS16GBK,ZHS32GB18030,AL16UTF16一些字元的測試
Unicode Character Sets In The Oracle Database
Overview
Oracle started supporting Unicode based character sets in Oracle7. Here is a summary of the Unicode character sets supported in Oracle:
Characterset Name RDBMS version Unicode version
AL24UTFFSS 7.2-8.1 1.1
UTF8 8.0-11g 2.1 (8.0-8.1.6) , 3.0 (8.1.7-11g)
UTFE 8.0-11g 2.1 (8.0-8.1.6) , 3.0 (8.1.7-11g)
AL32UTF8* 9.0-11g 3.0 (9.0), 3.1 (9.2), 3.2 (10.1), 4.01 (10.2), 5.0 (11.1).
AL16UTF16** 9.0-11g 3.0 (9.0), 3.1 (9.2), 3.2 (10.1), 4.01 (10.2), 5.0 (11.1).
* cannot be used as NLS_NCHAR_CHARACTERSET , can only be used as NLS_CHARACTERSET
** can only be used as NLS_NCHAR_CHARACTERSET, cannot be used as NLS_CHARACTERSET
我們考慮幾個字符集合
ZHS16CGB231280,ZHS16GBK,ZHS32GB18030,AL32UTF8
針對這幾種字符集合,從左到右,能顯示的字符集依次增加
在測試過程中,ZHS16CGB231280針對某些字元不能正常顯示,ZHS16GBK,ZHS32GB18030可以正常顯示,
ZHS32GB18030理論上比ZHS16GBK能顯示更多的字元
AL32UTF8使用3個位元組保留漢字,在空間上有浪費,但是顯示的字元能夠更多
1)------------------------------for 10g---------------------------------------------------
在這個case裡,建立資料庫的時候
CHARACTER SET zhs32gb18030
NATIONAL CHARACTER SET AL16UTF16
------------------------------------------------------------------------------------------
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
set lines 200
set pages 100
col parameter for a30
col value for a20
col ISDEPRECATED for a10
spool valid_character.txt
SELECT * FROM v$nls_valid_values WHERE parameter = 'CHARACTERSET';
col parameter for a30
col value for a60
select * from nls_database_parameters
PARAMETER VALUE
------------------------------ ------------------------------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET ZHS32GB18030
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 10.2.0.4.0
create user scott identified by tiger;
grant connect,resource to scott;
conn scott/tiger
drop table testchar1;
drop table testchar2;
drop table testchar3;
drop table testchar4;
create table testchar1(a1 varchar2(4),a2 varchar2(4),a3 varchar2(4),a4 varchar2(4));
create table testchar2(a1 nvarchar2(4),a2 nvarchar2(4),a3 nvarchar2(4),a4 nvarchar2(4));
create table testchar3(a1 char(4),a2 char(4),a3 char(4),a4 char(4));
create table testchar4(a1 nchar(4),a2 nchar(4),a3 nchar(4),a4 nchar(4));
insert into testchar1 values ('秊','裏','隣','兀');
insert into testchar2 values ('秊','裏','隣','兀');
insert into testchar3 values ('秊','裏','隣','兀');
insert into testchar4 values ('秊','裏','隣','兀');
commit;
SQL> select * from testchar1;
A1 A2 A3 A4
---- ---- ---- ----
秊 裏 隣 兀
SQL> select * from testchar2;
A1 A2 A3 A4
-------- -------- -------- --------
秊 裏 隣 兀
SQL> select * from testchar3;
A1 A2 A3 A4
---- ---- ---- ----
秊 裏 隣 兀
SQL> select * from testchar4;
A1 A2 A3 A4
-------- -------- -------- --------
秊 裏 隣 兀
2)------------------------------for 11g---------------------------------------------------
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
------------------------------------------------------------------------------------------
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
set lines 200
set pages 100
col parameter for a30
col value for a20
col ISDEPRECATED for a10
spool valid_character.txt
SELECT * FROM v$nls_valid_values WHERE parameter = 'CHARACTERSET';
col parameter for a30
col value for a60
select * from nls_database_parameters
PARAMETER VALUE
------------------------------ ------------------------------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET ZHS16GBK
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.1.0.6.0
create user scott identified by tiger;
grant connect,resource to scott;
conn scott/tiger
drop table testchar1;
drop table testchar2;
drop table testchar3;
drop table testchar4;
create table testchar1(a1 varchar2(4),a2 varchar2(4),a3 varchar2(4),a4 varchar2(4));
create table testchar2(a1 nvarchar2(4),a2 nvarchar2(4),a3 nvarchar2(4),a4 nvarchar2(4));
create table testchar3(a1 char(4),a2 char(4),a3 char(4),a4 char(4));
create table testchar4(a1 nchar(4),a2 nchar(4),a3 nchar(4),a4 nchar(4));
insert into testchar1 values ('秊','裏','隣','兀');
insert into testchar2 values ('秊','裏','隣','兀');
insert into testchar3 values ('秊','裏','隣','兀');
insert into testchar4 values ('秊','裏','隣','兀');
commit;
SQL> select * from testchar1;
A1 A2 A3 A4
---- ---- ---- ----
秊 裏 隣 兀
SQL> select * from testchar2;
A1 A2 A3 A4
-------- -------- -------- --------
秊 裏 隣 兀
SQL> select * from testchar3;
A1 A2 A3 A4
---- ---- ---- ----
秊 裏 隣 兀
SQL> select * from testchar4;
A1 A2 A3 A4
-------- -------- -------- --------
秊 裏 隣 兀
3)------------------------------for 11g---------------------------------------------------
CHARACTER SET zhs16cgb231280
NATIONAL CHARACTER SET AL16UTF16
由於建立資料庫的時候採用的是ZHS16GBK,這裡將字符集合修改成ZHS16CGB231280
------------------------------------------------------------------------------------------
一 首先檢視資料庫的字符集
sqlplus system/manager
col parameter for a40
col value for a40
set lines 200
select * from nls_database_parameters where PARAMETER='NLS_CHARACTERSET';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
NLS_CHARACTERSET ZHS16GBK
二 如不對可按以下方法修改(建議先備份)
To change the database character set, perform the following step:
1、SHUTDOWN IMMEDIATE; -- or NORMAL
2、
3、STARTUP MOUNT;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
ALTER DATABASE OPEN;
ALTER DATABASE CHARACTER SET ZHS16CGB231280;
ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16CGB231280;
4、SHUTDOWN IMMEDIATE; -- or NORMAL
5、STARTUP;
三 再次確定資料庫的字符集合
sqlplus system/manager
col parameter for a40
col value for a40
set lines 200
select * from nls_database_parameters where PARAMETER='NLS_CHARACTERSET';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
NLS_CHARACTERSET ZHS16CGB231280
export NLS_LANG=AMERICAN_AMERICA.ZHS16CGB231280
conn scott/tiger
drop table testchar1;
drop table testchar2;
drop table testchar3;
drop table testchar4;
create table testchar1(a1 varchar2(4),a2 varchar2(4),a3 varchar2(4),a4 varchar2(4));
create table testchar2(a1 nvarchar2(4),a2 nvarchar2(4),a3 nvarchar2(4),a4 nvarchar2(4));
create table testchar3(a1 char(4),a2 char(4),a3 char(4),a4 char(4));
create table testchar4(a1 nchar(4),a2 nchar(4),a3 nchar(4),a4 nchar(4));
insert into testchar1 values ('秊','裏','隣','兀');
insert into testchar2 values ('秊','裏','隣','兀');
insert into testchar3 values ('秊','裏','隣','兀');
insert into testchar4 values ('秊','裏','隣','兀');
commit;
SQL> select * from testchar1;
A1 A2 A3 A4
---- ---- ---- ----
y? y? y? t@
SQL> select * from testchar2;
A1 A2 A3 A4
-------- -------- -------- --------
£?£? £?£? £?£? £?@
SQL> select * from testchar3;
A1 A2 A3 A4
---- ---- ---- ----
y? y? y? t@
SQL> select * from testchar4;
A1 A2 A3 A4
-------- -------- -------- --------
£?£? £?£? £?£? £?@
4)------------------------------for 11g---------------------------------------------------
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
由於建立資料庫的時候採用的是ZHS16GBK,這裡將字符集合修改成AL32UTF8
export NLS_LANG=american_america.AL32UTF8
------------------------------------------------------------------------------------------
ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;
col parameter for a40
col value for a40
set lines 200
select * from nls_database_parameters where PARAMETER='NLS_CHARACTERSET';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
NLS_CHARACTERSET AL32UTF8
SQL> insert into testchar1 values ('y?','y?','y?','t@')
*
ERROR at line 1:
ORA-12899: value too large for column "SCOTT"."TESTCHAR1"."A1" (actual: 6, maximum: 4)
SQL>
1 row created.
SQL> insert into testchar3 values ('y?','y?','y?','t@')
*
ERROR at line 1:
ORA-12899: value too large for column "SCOTT"."TESTCHAR3"."A1" (actual: 6, maximum: 4)
SQL>
1 row created.
conn scott/tiger
drop table testchar1;
drop table testchar2;
drop table testchar3;
drop table testchar4;
create table testchar1(a1 varchar2(6),a2 varchar2(6),a3 varchar2(6),a4 varchar2(6));
create table testchar2(a1 nvarchar2(6),a2 nvarchar2(6),a3 nvarchar2(6),a4 nvarchar2(6));
create table testchar3(a1 char(6),a2 char(6),a3 char(6),a4 char(6));
create table testchar4(a1 nchar(6),a2 nchar(6),a3 nchar(6),a4 nchar(6));
insert into testchar1 values ('秊','裏','隣','兀');
insert into testchar2 values ('秊','裏','隣','兀');
insert into testchar3 values ('秊','裏','隣','兀');
insert into testchar4 values ('秊','裏','隣','兀');
commit;
SQL> select * from testchar1;
A1 A2 A3 A4
------ ------ ------ ------
秊 裏 隣 兀
SQL> select * from testchar2;
A1 A2 A3 A4
------------ ------------ ------------ ------------
秊 裏 隣 兀
SQL> select * from testchar3;
A1 A2 A3 A4
------ ------ ------ ------
秊 裏 隣 兀
SQL> select * from testchar4;
A1 A2 A3 A4
------------ ------------ ------------ ------------
秊 裏 隣 兀[@more@]
Overview
Oracle started supporting Unicode based character sets in Oracle7. Here is a summary of the Unicode character sets supported in Oracle:
Characterset Name RDBMS version Unicode version
AL24UTFFSS 7.2-8.1 1.1
UTF8 8.0-11g 2.1 (8.0-8.1.6) , 3.0 (8.1.7-11g)
UTFE 8.0-11g 2.1 (8.0-8.1.6) , 3.0 (8.1.7-11g)
AL32UTF8* 9.0-11g 3.0 (9.0), 3.1 (9.2), 3.2 (10.1), 4.01 (10.2), 5.0 (11.1).
AL16UTF16** 9.0-11g 3.0 (9.0), 3.1 (9.2), 3.2 (10.1), 4.01 (10.2), 5.0 (11.1).
* cannot be used as NLS_NCHAR_CHARACTERSET , can only be used as NLS_CHARACTERSET
** can only be used as NLS_NCHAR_CHARACTERSET, cannot be used as NLS_CHARACTERSET
我們考慮幾個字符集合
ZHS16CGB231280,ZHS16GBK,ZHS32GB18030,AL32UTF8
針對這幾種字符集合,從左到右,能顯示的字符集依次增加
在測試過程中,ZHS16CGB231280針對某些字元不能正常顯示,ZHS16GBK,ZHS32GB18030可以正常顯示,
ZHS32GB18030理論上比ZHS16GBK能顯示更多的字元
AL32UTF8使用3個位元組保留漢字,在空間上有浪費,但是顯示的字元能夠更多
1)------------------------------for 10g---------------------------------------------------
在這個case裡,建立資料庫的時候
CHARACTER SET zhs32gb18030
NATIONAL CHARACTER SET AL16UTF16
------------------------------------------------------------------------------------------
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
set lines 200
set pages 100
col parameter for a30
col value for a20
col ISDEPRECATED for a10
spool valid_character.txt
SELECT * FROM v$nls_valid_values WHERE parameter = 'CHARACTERSET';
col parameter for a30
col value for a60
select * from nls_database_parameters
PARAMETER VALUE
------------------------------ ------------------------------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET ZHS32GB18030
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 10.2.0.4.0
create user scott identified by tiger;
grant connect,resource to scott;
conn scott/tiger
drop table testchar1;
drop table testchar2;
drop table testchar3;
drop table testchar4;
create table testchar1(a1 varchar2(4),a2 varchar2(4),a3 varchar2(4),a4 varchar2(4));
create table testchar2(a1 nvarchar2(4),a2 nvarchar2(4),a3 nvarchar2(4),a4 nvarchar2(4));
create table testchar3(a1 char(4),a2 char(4),a3 char(4),a4 char(4));
create table testchar4(a1 nchar(4),a2 nchar(4),a3 nchar(4),a4 nchar(4));
insert into testchar1 values ('秊','裏','隣','兀');
insert into testchar2 values ('秊','裏','隣','兀');
insert into testchar3 values ('秊','裏','隣','兀');
insert into testchar4 values ('秊','裏','隣','兀');
commit;
SQL> select * from testchar1;
A1 A2 A3 A4
---- ---- ---- ----
秊 裏 隣 兀
SQL> select * from testchar2;
A1 A2 A3 A4
-------- -------- -------- --------
秊 裏 隣 兀
SQL> select * from testchar3;
A1 A2 A3 A4
---- ---- ---- ----
秊 裏 隣 兀
SQL> select * from testchar4;
A1 A2 A3 A4
-------- -------- -------- --------
秊 裏 隣 兀
2)------------------------------for 11g---------------------------------------------------
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
------------------------------------------------------------------------------------------
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
set lines 200
set pages 100
col parameter for a30
col value for a20
col ISDEPRECATED for a10
spool valid_character.txt
SELECT * FROM v$nls_valid_values WHERE parameter = 'CHARACTERSET';
col parameter for a30
col value for a60
select * from nls_database_parameters
PARAMETER VALUE
------------------------------ ------------------------------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET ZHS16GBK
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.1.0.6.0
create user scott identified by tiger;
grant connect,resource to scott;
conn scott/tiger
drop table testchar1;
drop table testchar2;
drop table testchar3;
drop table testchar4;
create table testchar1(a1 varchar2(4),a2 varchar2(4),a3 varchar2(4),a4 varchar2(4));
create table testchar2(a1 nvarchar2(4),a2 nvarchar2(4),a3 nvarchar2(4),a4 nvarchar2(4));
create table testchar3(a1 char(4),a2 char(4),a3 char(4),a4 char(4));
create table testchar4(a1 nchar(4),a2 nchar(4),a3 nchar(4),a4 nchar(4));
insert into testchar1 values ('秊','裏','隣','兀');
insert into testchar2 values ('秊','裏','隣','兀');
insert into testchar3 values ('秊','裏','隣','兀');
insert into testchar4 values ('秊','裏','隣','兀');
commit;
SQL> select * from testchar1;
A1 A2 A3 A4
---- ---- ---- ----
秊 裏 隣 兀
SQL> select * from testchar2;
A1 A2 A3 A4
-------- -------- -------- --------
秊 裏 隣 兀
SQL> select * from testchar3;
A1 A2 A3 A4
---- ---- ---- ----
秊 裏 隣 兀
SQL> select * from testchar4;
A1 A2 A3 A4
-------- -------- -------- --------
秊 裏 隣 兀
3)------------------------------for 11g---------------------------------------------------
CHARACTER SET zhs16cgb231280
NATIONAL CHARACTER SET AL16UTF16
由於建立資料庫的時候採用的是ZHS16GBK,這裡將字符集合修改成ZHS16CGB231280
------------------------------------------------------------------------------------------
一 首先檢視資料庫的字符集
sqlplus system/manager
col parameter for a40
col value for a40
set lines 200
select * from nls_database_parameters where PARAMETER='NLS_CHARACTERSET';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
NLS_CHARACTERSET ZHS16GBK
二 如不對可按以下方法修改(建議先備份)
To change the database character set, perform the following step:
1、SHUTDOWN IMMEDIATE; -- or NORMAL
2、
3、STARTUP MOUNT;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
ALTER DATABASE OPEN;
ALTER DATABASE CHARACTER SET ZHS16CGB231280;
ALTER DATABASE CHARACTER SET INTERNAL_USE ZHS16CGB231280;
4、SHUTDOWN IMMEDIATE; -- or NORMAL
5、STARTUP;
三 再次確定資料庫的字符集合
sqlplus system/manager
col parameter for a40
col value for a40
set lines 200
select * from nls_database_parameters where PARAMETER='NLS_CHARACTERSET';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
NLS_CHARACTERSET ZHS16CGB231280
export NLS_LANG=AMERICAN_AMERICA.ZHS16CGB231280
conn scott/tiger
drop table testchar1;
drop table testchar2;
drop table testchar3;
drop table testchar4;
create table testchar1(a1 varchar2(4),a2 varchar2(4),a3 varchar2(4),a4 varchar2(4));
create table testchar2(a1 nvarchar2(4),a2 nvarchar2(4),a3 nvarchar2(4),a4 nvarchar2(4));
create table testchar3(a1 char(4),a2 char(4),a3 char(4),a4 char(4));
create table testchar4(a1 nchar(4),a2 nchar(4),a3 nchar(4),a4 nchar(4));
insert into testchar1 values ('秊','裏','隣','兀');
insert into testchar2 values ('秊','裏','隣','兀');
insert into testchar3 values ('秊','裏','隣','兀');
insert into testchar4 values ('秊','裏','隣','兀');
commit;
SQL> select * from testchar1;
A1 A2 A3 A4
---- ---- ---- ----
y? y? y? t@
SQL> select * from testchar2;
A1 A2 A3 A4
-------- -------- -------- --------
£?£? £?£? £?£? £?@
SQL> select * from testchar3;
A1 A2 A3 A4
---- ---- ---- ----
y? y? y? t@
SQL> select * from testchar4;
A1 A2 A3 A4
-------- -------- -------- --------
£?£? £?£? £?£? £?@
4)------------------------------for 11g---------------------------------------------------
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
由於建立資料庫的時候採用的是ZHS16GBK,這裡將字符集合修改成AL32UTF8
export NLS_LANG=american_america.AL32UTF8
------------------------------------------------------------------------------------------
ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;
col parameter for a40
col value for a40
set lines 200
select * from nls_database_parameters where PARAMETER='NLS_CHARACTERSET';
PARAMETER VALUE
---------------------------------------- ----------------------------------------
NLS_CHARACTERSET AL32UTF8
SQL> insert into testchar1 values ('y?','y?','y?','t@')
*
ERROR at line 1:
ORA-12899: value too large for column "SCOTT"."TESTCHAR1"."A1" (actual: 6, maximum: 4)
SQL>
1 row created.
SQL> insert into testchar3 values ('y?','y?','y?','t@')
*
ERROR at line 1:
ORA-12899: value too large for column "SCOTT"."TESTCHAR3"."A1" (actual: 6, maximum: 4)
SQL>
1 row created.
conn scott/tiger
drop table testchar1;
drop table testchar2;
drop table testchar3;
drop table testchar4;
create table testchar1(a1 varchar2(6),a2 varchar2(6),a3 varchar2(6),a4 varchar2(6));
create table testchar2(a1 nvarchar2(6),a2 nvarchar2(6),a3 nvarchar2(6),a4 nvarchar2(6));
create table testchar3(a1 char(6),a2 char(6),a3 char(6),a4 char(6));
create table testchar4(a1 nchar(6),a2 nchar(6),a3 nchar(6),a4 nchar(6));
insert into testchar1 values ('秊','裏','隣','兀');
insert into testchar2 values ('秊','裏','隣','兀');
insert into testchar3 values ('秊','裏','隣','兀');
insert into testchar4 values ('秊','裏','隣','兀');
commit;
SQL> select * from testchar1;
A1 A2 A3 A4
------ ------ ------ ------
秊 裏 隣 兀
SQL> select * from testchar2;
A1 A2 A3 A4
------------ ------------ ------------ ------------
秊 裏 隣 兀
SQL> select * from testchar3;
A1 A2 A3 A4
------ ------ ------ ------
秊 裏 隣 兀
SQL> select * from testchar4;
A1 A2 A3 A4
------------ ------------ ------------ ------------
秊 裏 隣 兀[@more@]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/48010/viewspace-1030324/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL字元函式的壓力測試MySql字元函式
- split partition的一些測試
- exchange partition的一些測試
- Julia語言的一些測試
- 一些sqll測試題SQL
- 關於SQLServer中的字元儲存的問題的測試SQLServer字元
- 一些簡單的Python測試題Python
- 測試工具培訓的一些建議
- 關於SQL Server中的字元儲存的問題的測試SQLServer字元
- Linux常用C函式—字元測試篇(轉)Linux函式字元
- 學習自動化測試的一些感悟
- 一些ASM 資料庫的測試和管理ASM資料庫
- 單元測試怎麼做的一些思考
- 10年老測試工程師的一些心得:結合案例談談迴歸測試和確認測試工程師
- 採用exp匯入zhs16gbk雙位元組字元到utf8三位元組字元字元
- 針對mysql不同binlog模式的一些測試MySql模式
- jmock 進行單元測試的一些疑問Mock
- 測試管理者常遇到的一些問題
- 測試用 oracle11g更改字符集AL32UTF8為ZHS16GBKOracle
- 測試測試測試測試測試測試
- linux C程式設計中常用的函式--字元測試篇LinuxC程式程式設計函式字元
- 關於java中String字元轉碼的幾個小測試Java字元
- ABAP對字元的一些基礎操作字元
- 移動端遊戲測試一些問答遊戲
- 菜鳥教程 html測試一些問題HTML
- 今天測試oracle stream遇到一些問題Oracle
- 除錯,虛擬環境檢測試的一些新想法除錯
- 送給測試行業朋友們的一些中肯建議行業
- 一些免費好用的靶機滲透測試環境
- 通過ZHS16GBK和AL32UTF8字元編碼分析exp/imp字元
- 黑盒測試、白盒測試、單元測試、整合測試、系統測試、驗收測試的區別與聯絡...
- 在Mac上輸入特殊字元的一些方法Mac字元
- 小白測試系列:介面測試與效能測試的區別
- 軟體測試中的功能測試和非功能測試
- 軟體測試中功能測試的測試工作流程
- 功能測試、自動化測試、效能測試的區別
- 對於JavaScript實現排序演算法的一些其他測試JavaScript排序演算法
- 做iOS自動化測試必須知道的一些知識iOS