Description\n-----------\n\nStrings are sequences of characters and enclosed with quotes.\n\nThe syntax is:\n\n``sql\n[_charset_name]'string' [COLLATE collation_name]\n`\n\nFor example:\n\n`sql\n'The MariaDB Foundation'\n_utf8 'Foundation' COLLATE utf8_unicode_ci;\n`\n\nStrings can either be enclosed in single quotes or in double quotes (the same character must be used to both open and close the string).\n\nThe ANSI SQL-standard does not permit double quotes for enclosing strings, and although MariaDB does by default, if the MariaDB server has enabled the ANSI_QUOTES_SQL SQL_MODE, double quotes will be treated as being used for identifiers instead of strings.\n\nStrings that are next to each other are automatically concatenated. The following are equivalent:\n\n`\n'The ' 'MariaDB ' 'Foundation'\n`\n\n`\n'The MariaDB Foundation'\n`\n\nThe \\ (backslash character) is used to escape characters (unless the SQL_MODE hasn't been set to NO_BACKSLASH_ESCAPES):\n\n`\n'MariaDB's new features'\n`\n\nThat is not a valid string because of the single quote in the middle of the string, which is treated as if it closes the string, but is actually meant as part of the string, an apostrophe. The backslash character helps in situations like this:\n\n`\n'MariaDB\\'s new features'\n`\n\nThat is now a valid string, and if displayed, will appear without the backslash.\n\n`sql\nSELECT 'MariaDB\\'s new features';\n+------------------------+\n| MariaDB's new features |\n+------------------------+\n| MariaDB's new features |\n+------------------------+\n`\n\nAnother way to escape the quoting character is repeating it twice:\n\n`sql\nSELECT 'I''m here', """Double""";\n+----------+----------+\n| I'm here | "Double" |\n+----------+----------+\n| I'm here | "Double" |\n+----------+----------+\n`\n\nEscape Sequences\n\nThere are other escape sequences:\n\n| Escape sequence | Character                                           |\n| --------------- | --------------------------------------------------- |\n| \\0              | ASCII NUL (0x00).                                   |\n| '               | Single quote (“'”).                                 |\n| "               | Double quote (“"”).                                 |\n| \\b              | Backspace.                                          |\n|                 | Newline, or linefeed,.                              |\n|                 | Carriage return.                                    |\n|                 | Tab.                                                |\n| \\Z              | ASCII 26 (Control+Z). See note following the table. |\n| \\\\              | Backslash (“\\”).                                    |\n| %               | “%” character. See note following the table.        |\n| _              | A “_” character. See note following the table.     |\n\nEscaping the % and _ characters can be necessary when using the LIKE operator, which treats them as special characters.\n\nThe ASCII 26 character (\\Z) needs to be escaped when included in a batch file which needs to be executed in Windows. The reason is that ASCII 26, in Windows, is the end of file (EOF).\n\nBackslash (\\`), if not used as an escape character, must always be escaped. When followed by a character that is not in the above table, backslashes will simply be ignored.\n\nURL: https://mariadb.com/docs/server/reference/sql-structure/sql-language-structure/string-literals