Translation: SET NAMES
This article is a translation of the mariadb official manual: set names.
Original article: https://mariadb.com/kb/en/set-names/
Https://mariadb.com/kb/zh-cn/set-names/ I submitted to the MariaDB official manual
Syntax
SET NAMES {'charset_name' [COLLATE 'collation_name'] | DEFAULT}
Description
This sets the variables character_set_client, character_set_connection, and character_set_results, and implicitly sets the session-level system variable collation_connection as the specified character set and sorting rule.
It determines the character set used when the client sends the statement to the server and the server returns the statement execution result to the client.
The COLLATE clause is optional. If it is not defined (or set to DEFAULT), the DEFAULT sorting rule of the character set is used.
Go back to the Linux series article outline: workshop!