The TO_SINGLE_BYTE function in Oracle SQL / PLSQL is used to get a character value with all the multi byte characters converted to single byte characters.
To use TO_SINGLE_BYTE function make sure that the data base contains both single and multi byte characters.
The Syntax for the TO_SINGLE_BYTE function in Oracle SQL / PLSQL is:
SEELECT TO_SINGLE_BYTE(character1)
FROM table_name;
- character1 can be of any type like char, varchar2, nchar or nvarchar2
- The return type of TO_SINGLE_BYTE function will be of the same data type as that of the character1.
Example 1:
SELECT TO_SINGLE_BYTE ('Tech Honey') FROM DUAL;
Will return the single byte character value of ‘Tech Honey’