오라클에서 한글은 3Byte를 차지한다.

 

확인은 VSIZE() 함수로 확인 할 수 있다.
LENGTHB()도 사용가능

 

 

-- 쿼리

SELECT 

    VSIZE('가나다')  AS BYTES1

    , LENGTHB('가나다')  AS BYTES2
  FROM DUAL;

 

 

-- 결과

BYTES1 BYTES2
9           9

 

 

출처>

VSIZE

https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions213.htm

 

Purpose

VSIZE returns the number of bytes in the internal representation of expr. If expr is null, then this function returns null.

This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion.

 

 

LENGTHB

https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions076.htm

 

Restriction on LENGTHB The LENGTHB function is supported for single-byte LOBs only. It cannot be used with CLOB and NCLOB data in a multibyte character set.

 

728x90

+ Recent posts