Purpose
You can use this statement to set the client, connection, and result character set and collation.
Syntax
SET NAMES charset_name [COLLATE collation_name]
Parameters
| Parameter | Description |
|---|---|
| charset_name | The default character set for columns in the table. Valid values:
|
| collation_name | The default collation for columns in the table. Valid values:
|
Examples
Set the client, connection, and result character set to gbk and the collation to gbk_bin.
obclient> SET NAMES gbk COLLATE gbk_bin;
Query OK, 0 rows affected