top of page
CerebroSQL

SET NAMES

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Syntax:
SET NAMES {'charset_name'
[COLLATE 'collation_name'] | DEFAULT}

This statement sets the three session system variables
character_set_client, character_set_connection, and
character_set_results to the given character set. Setting
character_set_connection to charset_name also sets collation_connection
to the default collation for charset_name. See
https://dev.mysql.com/doc/refman/8.0/en/charset-connection.html.

The optional COLLATE clause may be used to specify a collation
explicitly. If given, the collation must one of the permitted
collations for charset_name.

charset_name and collation_name may be quoted or unquoted.

The default mapping can be restored by using a value of DEFAULT. The
default depends on the server configuration.

Some character sets cannot be used as the client character set.
Attempting to use them with SET NAMES produces an error. See
https://dev.mysql.com/doc/refman/8.0/en/charset-connection.html#charset
-connection-impermissible-client-charset.

URL: https://dev.mysql.com/doc/refman/8.0/en/set-names.html

Example

bottom of page