MySQL 8.0 Release Notes
MySQL 8.0 Source Code Documentation
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.
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` |
+---------------------------------+