1. 첫번째 서버
select * from nls_database_parameters
PARAMETER VALUE
------------------------------ -------------------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET AL32UTF8
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 UTF8
NLS_RDBMS_VERSION 9.2.0.4.0
20 rows selected
CREATE TABLE TEST
(
NAME1 VARCHAR2(10 BYTE) NOT NULL,
NAME2 NVARCHAR2(10) NOT NULL
)
select * from test
NAME1 NAME2
---------- ------------------------------
abcdefghij abcdefghij
안 안녕하세요
안녕 안녕하세요
안녕하 안녕하세요
가나다 안녕하세요
가나다 안녕하세요안녕하세요
ㄴㄷㅁ 안녕하세요안녕하세요
7 rows selected
select length(name1), length(name2) from test
LENGTH(NAME1) LENGTH(NAME2)
------------- -------------
10 10
1 5
2 5
3 5
3 5
3 10
3 10
7 rows selected
select lengthb(name1), lengthb(name2) from test
LENGTHB(NAME1) LENGTHB(NAME2)
-------------- --------------
10 10
3 15
6 15
9 15
9 15
9 30
9 30
7 rows selected
2. 두번째 서버
select * from nls_database_parameters
PARAMETER VALUE
------------------------------ -------------------------------------------------
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET KO16KSC5601
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 9.2.0.4.0
20 rows selected
select * from test
NAME1 NAME2
---------- --------------------
abcdefghij abcdefghij
안 안녕하세요
안녕 안녕하세요
안녕하 안녕하세요
가나다 안녕하세요
가나다 안녕하세요안녕하세요
ㄴㄷㅁ 안녕하세요안녕하세요
7 rows selected
select length(name1), length(name2) from test
LENGTH(NAME1) LENGTH(NAME2)
------------- -------------
10 10
1 5
2 5
3 5
3 5
3 10
3 10
7 rows selected
select lengthb(name1), lengthb(name2) from test
LENGTHB(NAME1) LENGTHB(NAME2)
-------------- --------------
10 20
2 10
4 10
6 10
6 10
6 20
6 20
7 rows selected