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


Sets the character_set_client, character_set_connection, character_set_results and, implicitly, the collation_connection session system variables to the specified character set and collation.

This determines which character set the client will use to send statements to the server, and the server will use for sending results back to the client.

The collation clause is optional. If not defined (or if DEFAULT is specified), the default collation for the character set will be used.

See also


Comments loading...