SET NAMES
Description
Sets the client, connection, and result character sets and collations.
Syntax
SET NAMES charset_name [COLLATE collation_name]
Parameters
| Parameter | Description |
|---|---|
| charset_name | The default character set for the columns in the table. Valid values:
|
| collation_name | The default collation for the columns in the table. Valid values:
|
Examples
Set the client, connection, and result character sets to gbk and the collations to gbk_bin.
SET NAMES gbk COLLATE gbk_bin;
Query OK, 0 rows affected (0.126 sec)