Purpose
Set the character sets and collations for the client, connection, and results.
Syntax
SET NAMES charset_name [COLLATE collation_name]
Parameters
Parameter |
Description |
|---|---|
| charset_name | Specify the default character set for columns in a table. The following character sets are supported:
|
| collation_name | To specify the default collation for columns in a table, you can use the following collations:
|
Examples
Specify the client, connection, and result character sets as gbk, and the collation as gbk_bin.
obclient> SET NAMES gbk COLLATE gbk_bin;