Skip to content

TO_SINGLE_BYTE

SELECT TO_SINGLE_BYTE('SQL文本') FROM dual;
S Q L文本

The TO_SINGLE_BYTE function in Oracle converts multibyte characters to their single-byte equivalents if they exist. In this example, only the ascii characters ‘S’, ‘Q’, and ‘L’ have a single-byte equivalents while the multibyte character ‘文本’ does not. Therefore, they remain unchanged in the output.