SET NAMES

You are viewing an old version of this article. View the current version here.

Syntax

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

Description

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

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.