Oracle 5.0 Reference Manual page 809

Table of Contents

Advertisement

for
INSTR()
[892],
REPEAT()
[893],
RTRIM()
[895].
UPPER()
Note: The
REPLACE()
string input and performs a case-sensitive comparison.
If a string input or function result is a binary string, the string has no character set or collation. This can
be checked by using the
to indicate that their argument is a binary string:
binary
mysql>
SELECT CHARSET(BINARY 'a'), COLLATION(BINARY 'a');
+---------------------+-----------------------+
| CHARSET(BINARY 'a') | COLLATION(BINARY 'a') |
+---------------------+-----------------------+
| binary
+---------------------+-----------------------+
For operations that combine multiple string inputs and return a single string output, the "aggregation
rules" of standard SQL apply for determining the collation of the result:
• If an explicit
• If explicit
COLLATE X
• Otherwise, if all collations are X, use X.
• Otherwise, the result has no collation.
For example, with
resulting collation is X. The same applies for UNION,
GREATEST()
For operations that convert to character data, the character set and collation of the strings
that result from the operations are defined by the
collation_connection
[909],
CONV()
applies to
CHAR()
If you are uncertain about the character set or collation of the result returned by a string function, you
can use the
mysql>
SELECT USER(), CHARSET(USER()), COLLATION(USER());
+----------------+-----------------+-------------------+
| USER()
+----------------+-----------------+-------------------+
| test@localhost | utf8
+----------------+-----------------+-------------------+
10.1.9.2.
CONVERT()
CONVERT()
CONVERT(expr
In MySQL, transcoding names are the same as the corresponding character set names.
Examples:
SELECT CONVERT(_latin1'Müller' USING utf8);
INSERT INTO utf8table (utf8column)
SELECT CONVERT(latin1field USING utf8) FROM latin1table;
CONVERT(... USING ...)
Operations Affected by Character Set Support
[889],
[889],
LCASE()
[892],
REPLACE()
[893],
SOUNDEX()
[892]
function, unlike all other functions, always ignores the collation of the
CHARSET()
| binary
occurs, use X.
COLLATE X
and
COLLATE Y
CASE ... WHEN a THEN b WHEN b THEN c COLLATE X
[878],
[883], and
IF()
[443]
system variables. This applies only to
[889],
FORMAT()
HEX()
[886].
[958]
or
CHARSET()
COLLATION()
| CHARSET(USER()) | COLLATION(USER()) |
and
CAST()
[948]
provides a way to convert data between different character sets. The syntax is:
USING transcoding_name)
[948]
[890],
LOWER()
LTRIM()
[892],
REVERSE()
RIGHT()
[894],
SUBSTRING()
TRIM()
[958]
and
COLLATION()
|
occur, raise an error.
[881],
||
[879].
LEAST()
character_set_connection
[889],
[893]. Before MySQL 5.0.15, it also
SPACE()
[959]
function to find out:
| utf8_general_ci
is implemented according to the standard SQL specification.
789
[891],
[891],
MID()
[892],
[892],
RPAD()
[894],
UCASE()
[959]
functions, both of which return
END, the
[887],
CONCAT()
ELT()
[948],
CAST()
|
[895], and
[888],
[442]
and

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents