Purpose
Sets the character set and collation for the client, connection, and results.
Syntax
SET NAMES charset_name [COLLATE collation_name]
Parameters
| Parameter | Description |
|---|---|
| charset_name | Specifies the default character set for the columns in the table. Valid values:
|
| collation_name | Specifies the default collation for the columns in the table. Valid values:
|
Examples
Specify the character set as gbk and the collation as gbk_bin for the client, connection, and results.
obclient> SET NAMES gbk COLLATE gbk_bin;
