In MySQL we can create queries with or without the backtick (`) symbol. Example:


Both works fine in mysql-console.

Is there any technical difference between them?

Is there any benefit using (`) over over simple queries?

5 Answers 5


They are called quoted identifiers and they tell the parser to handle the text between them as a literal string. They are useful for when you have a column or table that contains a keyword or space. For instance the following would not work:

CREATE TABLE my table (id INT);

But the following would:

CREATE TABLE `my table` (id INT);

Also, the following would get an error, because COUNT is a reserved keyword:

SELECT count FROM some_table

But the following would be parsed correctly:

SELECT `count` FROM some_table

I hope this helps you.


If you want to use something around object identifiers, use at least the standard double quotes: "

This works in MySQL, PostgreSQL, SQL Server, Oracle, etc. etc. For MySQL you might need the SQL mode ansi_quotes, depending on the default configuration:

SET sql_mode = 'ANSI_QUOTES';

Backticks ` are only used in MySQL, you learn a type of SQL that won't work in any other brand of DBMS.

  • 2
    Using quotes will throw a SQL syntax error in MySQL/MariaDb without sql_mode ANSI_QUOTES Commented Apr 26, 2021 at 13:54

It means you can have spaces in table names. Not particular appealing, of course. Same with SQL Server's [].


It can be helpful if you have a column with name that is reserved,

eg: You can query a statement like this:

select * from tablename group by `group`;

From my point of view, @Mr.Brownstone answer is only partially correct.

The backtick ` is used in MySQL to delimit literals that represent identifiers (not strings).

This allows you to use not usually accepted characters like spaces, reserved words, etc. as identifiers. For example:

SELECT * FROM `Strange table name`;

Also important is that it also allows the parser to know if you are doing something wrong like selecting a column that doesn't exist. For example:

SELECT notexistingcolumn FROM atable;

If atable exists but notexistingcolumn column doesn't exist it will be interpreted as the literal string "notexistingcolumn" selecting it as a value (and probably emitting a warning).

Instead, if you use:

SELECT `notexistingcolumn` FROM `atable`;

It will recognize that notexistingcolumn is the name of a column that doesn't exist and throw an error.

I think is always preferable to surround identifiers with backticks including the alias and try to avoid using reserved words and strange characters for identifiers.

You can read more about the MySQL backtick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.