(mysql.info.gz) Charset-column
Info Catalog
(mysql.info.gz) Charset-table
(mysql.info.gz) Charset-defaults
(mysql.info.gz) Charset-examples
10.3.4 Column Character Set and Collation
-----------------------------------------
Every "character" column (that is, a column of type `CHAR', `VARCHAR',
or `TEXT') has a column character set and a column collation, which may
not be null. Column definition syntax has optional clauses for
specifying the column character set and collation:
COL_NAME {CHAR | VARCHAR | TEXT} (COL_LENGTH)
[CHARACTER SET CHARSET_NAME [COLLATE COLLATION_NAME]]
Example:
CREATE TABLE Table1
(
column1 VARCHAR(5) CHARACTER SET latin1 COLLATE latin1_german1_ci
);
MySQL chooses the column character set and collation thus:
* If both `CHARACTER SET X' and `COLLATE Y' were specified, then
character set X and collation Y.
* If `CHARACTER SET X' was specified without `COLLATE', then
character set `X' and its default collation.
* Otherwise, the table character set and collation.
The `CHARACTER SET' and `COLLATE' clauses are standard SQL.
Info Catalog
(mysql.info.gz) Charset-table
(mysql.info.gz) Charset-defaults
(mysql.info.gz) Charset-examples
automatically generated byinfo2html