In MySQL, we can use the sys.quote_identifier()
function to quote a string to produce a result that can be used as an identifier in a SQL statement.
The string is returned enclosed by backticks (`
), with each instance of a backtick doubled.
This function can be handy when a value to be used as an identifier is a reserved word or contains backtick characters.
Continue reading