Convert single-byte and multi-byte characters In Oracle using TO_MULTI_BYTE

By Santhosh N

This explains how to convert the both single-byte and multi-byte characters in oracle string to multi-byte characters.

There is a conversion function in oracle by the name, TO_MULTI_BYTE which converts all the single-byte characters (also multi-byte characters) to the multi-byte characters. This is the opposite to the TO_SINGLE_BYTE function.

Syntax: TO_MULTI_BYTE (char)

Here char is the character that needs to be converted and it can be a char, varchar2, nchar, or nvarchar2 value.

Ex1: SELECT TO_MULTI_BYTE ('egg') FROM dual;
This returns “egg” as result, which is of multiple bytes.

Related FAQs

This explains how to convert the given number to the interval year to the month literal in oracle
Use Oracle TO_NUMBER to convert a string to a number and format the number in the desired nls language.
This explains how to convert the string to date format in oracle.
This explains how to convert the string to an interval Day to Second type in oracle.
This explains how to convert a rowid to varchar2 type in oracle.
This explains how to convert a char, varchar2, nchar or nvarchar2 value to rowid of a table in oracle database
Convert single-byte and multi-byte characters In Oracle using TO_MULTI_BYTE  (2169 Views)