The STRING_TO_RAW function converts a VARCHAR or NVARCHAR string into data in another valid character set and returns the result as RAW data.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.
Syntax
UTL_I18N.STRING_TO_RAW (
data IN VARCHAR,
dst_charset IN VARCHAR := NULL)
RETURN RAW AS ret RAW(32767);
Parameters
| Parameter | Description |
|---|---|
| data | Specifies the VARCHAR or NVARCHAR string to be converted. |
| dst_charset | Specifies the destination character set. If the value of dst_charset is NULL, the database character set is used for CHAR data, and the national character set is used for NCHAR data. |
Considerations
If you specify an invalid character set or a string that is NULL or 0 in length, this function returns a NULL string.