Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 45.1Mb
PDF (A4) - 45.2Mb
PDF (RPM) - 40.9Mb
HTML Download (TGZ) - 10.6Mb
HTML Download (Zip) - 10.6Mb
HTML Download (RPM) - 9.2Mb
Man Pages (TGZ) - 207.7Kb
Man Pages (Zip) - 309.9Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
Excerpts from this Manual

MySQL 8.0 Reference Manual  /  ...  /  The quote_identifier() Function The quote_identifier() Function

Given a string argument, this function produces a quoted identifier suitable for inclusion in SQL statements. This is useful when a value to be used as an identifier is a reserved word or contains backtick (`) characters.


in_identifier TEXT: The identifier to quote.

Return Value

A TEXT value.

mysql> SELECT sys.quote_identifier('plain');
| sys.quote_identifier('plain') |
| `plain`                       |
mysql> SELECT sys.quote_identifier('trick`ier');
| sys.quote_identifier('trick`ier') |
| `trick``ier`                      |
mysql> SELECT sys.quote_identifier('integer');
| sys.quote_identifier('integer') |
| `integer`                       |

User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.