TO_SINGLE_BYTE
Syntax
TO_SINGLE_BYTE
(
str IN text
)
RETURNS text;
Overview
The TO_SINGLE_BYTE function converts the input multibyte string into the corresponding single-byte (ASCII) characters, if possible.
Multi-byte characters in the input string are replaced with single-byte values (usually values with ASCII code 0x20 or higher) by a predefined mapping table, and unconvertible characters are returned as they are.
Parameter
Parameter
Description
str
text
type; Target string to convert. Multi-byte characters are converted to single-byte characters.
Example
SELECT oracle.TO_SINGLE_BYTE('Hello, world!');
-- example result: 'Hello, world!'
to_single_byte
----------------
Hello, world!
(1 row)
Last updated