String Comparison Functions - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

This function is multi-byte safe.
UCASE(str)
UCASE()
UNHEX(str)
For a string argument str,
HEX(str)
number and converts it to the character represented by the number. The return value is a binary
string.
mysql>
SELECT UNHEX('4D7953514C');
-> 'MySQL'
mysql>
SELECT 0x4D7953514C;
-> 'MySQL'
mysql>
SELECT UNHEX(HEX('string'));
-> 'string'
mysql>
SELECT HEX(UNHEX('1267'));
-> '1267'
The characters in the argument string must be legal hexadecimal digits:
.. 'f'. If the argument contains any nonhexadecimal digits, the result is NULL:
mysql>
SELECT UNHEX('GG');
+-------------+
| UNHEX('GG') |
+-------------+
| NULL
+-------------+
A
result can occur if the argument to
NULL
are padded with 0x00 bytes when stored but those bytes are not stripped on retrieval. For example,
is stored into a
'41'
stripped), so
a
BINARY(3)
stripped).
NULL.
For a numeric argument N, the inverse of
CONV(HEX(N),16,10)
UPPER(str)
Returns the string
set mapping. The default is
mysql>
SELECT UPPER('Hej');
-> 'HEJ'
See the description of
as information about how to perform lettercase conversion of binary strings (BINARY, VARBINARY,
BLOB) for which these functions are ineffective.
This function is multi-byte safe.

12.5.1. String Comparison Functions

Table 12.8. String Comparison Operators
Name
[896]
LIKE
String Comparison Functions
[895]
[895]
is a synonym for
UPPER()
[895]
UNHEX(str)
[889]. That is, it interprets each pair of characters in the argument as a hexadecimal
|
column as
CHAR(3)
[895]
for the column value returns 'A'. By contrast
UNHEX()
column as
'41\0'
is not a legal hexadecimal digit, so
'\0'
[909]
instead. See the description of
[895]
with all characters changed to uppercase according to the current character
str
latin1
[890]
LOWER()
[895].
[895]
performs the inverse operation of
[895]
UNHEX()
and retrieved as
'41 '
and retrieved as
'41\0'
UNHEX()
[889]
is not performed by
HEX(N)
(cp1252 West European).
for information that also applies to
Description
Simple pattern matching
895
.. '9',
'0'
is a
column, because values
BINARY
(with the trailing pad space
'41'
is stored into
'41'
(with the trailing pad
0x00
[895]
for the column value returns
UNHEX()
[889].
HEX()
UPPER()
.. 'F',
'A'
'a'
byte not
[895]. Use
[895], such

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

This manual is also suitable for:

Mysql 5.0

Table of Contents