Oracle 5.0 Reference Manual page 851

Table of Contents

Advertisement

• The
CHARACTER SET
collation for the character set. For example:
CREATE TABLE t
(
c1 VARCHAR(20) CHARACTER SET utf8,
c2 TEXT CHARACTER SET latin1 COLLATE latin1_general_cs
);
This table definition creates a column named
collation for that character set, and a column named
case-sensitive collation.
The rules for assigning the character set and collation when either or both of the
and
attributes are missing are described in
COLLATE
Collation".
is a synonym for
CHARSET
• Specifying the
CHARACTER SET binary
to be created as the corresponding binary data type:
VARBINARY, and
TEXT
they are created as declared. Suppose that you specify a table using this definition:
CREATE TABLE t
(
c1 VARCHAR(10) CHARACTER SET binary,
c2 TEXT CHARACTER SET binary,
c3 ENUM('a','b','c') CHARACTER SET binary
);
The resulting table has this definition:
CREATE TABLE t
(
c1 VARBINARY(10),
c2 BLOB,
c3 ENUM('a','b','c') CHARACTER SET binary
);
• The
attribute is shorthand for
ASCII
• The
attribute is shorthand for
UNICODE
• The
attribute is shorthand for specifying the binary collation of the column character set.
BINARY
In this case, sorting and comparison are based on numeric character values. (Before MySQL
4.1,
caused a column to store binary strings and sorting and comparison were based on
BINARY
numeric byte values. This is the same as using character values for single-byte character sets, but
not for multi-byte character sets.)
• Character column sorting and comparison are based on the character set assigned to the column.
(Before MySQL 4.1, sorting and comparison were based on the collation of the server character set.)
For the CHAR, VARCHAR, TEXT, ENUM, and
collation or the
BINARY
code values rather than a lexical ordering.
Section 10.1, "Character Set
MySQL.
[NATIONAL] CHAR[(M)] [CHARACTER SET charset_name] [COLLATE
collation_name]
String Type Overview
attribute specifies the character set, and the
CHARACTER
SET.
attribute for a character data type causes the column
becomes BLOB. For the
CHARACTER SET
CHARACTER SET
SET
attribute to cause sorting and comparison to use the underlying character
Support", provides additional information about use of character sets in
831
COLLATE
that has a character set of
c1
that has a character set of
c2
Section 10.1.3.4, "Column Character Set and
becomes BINARY,
CHAR
and
data types, this does not occur;
ENUM
SET
latin1.
ucs2.
data types, you can declare a column with a binary
attribute specifies a
with the default
utf8
and a
latin1
CHARACTER SET
becomes
VARCHAR

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents