Each table has a table character set and a proofreading rule. It cannot be blank. To specify the TABLE Character Set and collation, the create table and alter table statements have an optional clause:
Create table tbl_name (column_list)
[Default character set charset_name [COLLATE collation_name]
Alter table tbl_name
[Default character set charset_name] [COLLATE collation_name]
For example:
Create table t1 (...)
Default character set latin1 COLLATE latin1_danish_ci;
MySQL selects the table Character Set and proofreading rules as follows:
· If character set x and collate y are specified, character set x and collate y are used.
· If character set x is specified but collate y is not specified, character set x and character set x are used as the default proofreading rules.
· Otherwise, server character sets and server verification rules are used.
If the column Character Set and collation are not specified in the column definition, the table Character Set and collation are used by default. Table character sets and proofreading rules are extensions of MySQL; they are not in standard SQL.