String Literals Quoted strings placed next to each other are concatenated to a single string. The following lines are equivalent: ’a string’ ’a’ ’ ’ ’string’ If the  ANSI_QUOTES  SQL mode is enabled, string literals can be quoted only within single quotation marks because a string quoted within double quotation marks is interpreted as an identifier. A  binary string  is a string of bytes. Every binary string has a character set and collation named  binary . A nonbinary string  is a string of characters. It has a character set other than  binary  and a collation that is compatible with the character set. For both types of strings, comparisons are based on the numeric values of the string unit. For binary strings, the unit is the byte; comparisons use numeric byte values. For nonbinary strings, the unit is the character and some character sets support multibyte characters; comparisons use numeric character code values. Character code ordering is a function of the string collation. (For more information, see Section 10.8.5, “The binary Collation Compared to _bin Collations” .) Within the  mysql  client, binary strings display using hexadecimal notation, depending on the value of the  --binary-as-hex . For more information about that option, see Section 4.5.1, “mysql — The MySQL Command-Line Client” . A character string literal may have an optional character set introducer and  COLLATE  clause, to designate it as a string that uses a particular character set and collation: [_ charset_name ]’ string ’ [COLLATE  collation_name ] Examples: You can use  N’ literal ’  (or  n’ literal ’ ) to create a string in the national character set. These statements are equivalent: For information about these forms of string syntax, see Section 10.3.7, “The National Character Set” , and Section 10.3.8, “Character Set Introducers” . Within a string, certain sequences have special meaning unless the  NO_BACKSLASH_ESCAPES  SQL mode is enabled. Each of these sequences begins with a backslash ( \ ), known as the  escape character . MySQL recognizes the escape sequences shown in Table 9.1, “Special Character Escape Sequences” . For all other escape sequences, backslash is ignored. That is, the escaped character is interpreted as if it was not escaped. For example,  \x  is just  x . These sequences are case-sensitive. For example,  \b  is interpreted as a backspace, but  \B  is interpreted as  B . Escape processing is done according to the character set indicated by the  character_set_connection  system variable. This is true even for strings that are preceded by an introducer that indicates a different character set, as discussed in Section 10.3.6, “Character String Literal Character Set and Collation” . 1860 Note SELECT _latin1’ string ’; SELECT _binary’ string ’; SELECT _utf8’ string ’ COLLATE utf8_danish_ci; SELECT N’some text’; SELECT n’some text’; SELECT _utf8’some text’; Table 9.1 Special Character Escape Sequences Escape Sequence Character Represented by Sequence \0 An ASCII NUL ( X’00’ ) character