Mysql – How to drop column named `

MySQLmysql-5.6

I managed to create a column in my MySQL database named ` (the backtick character). How can I delete it? Is there a way to escape the backtick character in a query?

Best Answer

You could try setting the sql_mode to use ANSI_QUOTES and then dropping the column that way:

SET sql_mode = 'ANSI_QUOTES';

ALTER TABLE "schema"."table" DROP COLUMN "`";
Related Question