TO_MULTI_BYTE

TO_MULTI_BYTE is a character function in SQL used to convert a SINGLE-BYTE char to a MULTI-BYTE char. The function becomes useful in processing and manipulation of different character sets, particularly in multilingual databases.

TO_MULTI_BYTE(single_byte_char)

  • single_byte_char: It is the NCHAR or NVARCHAR2 character that will be converted to a multibyte representation.

Example

SELECT TO_MULTI_BYTE('ABC')
FROM dual;

Output

'ABC'

Explanation

The TO_MULTI_BYTE function doesn’t change the string ‘ABC’ because it only contains ASCII characters which are already single-byte. This function is used to convert single-byte characters to their corresponding multi-byte characters. The dual table is a dummy table in Oracle.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.