What is the purpose of this symbol in MySQL queries?
`
For example:
SELECT `show` FROM table WHERE id = "4"
What is the purpose of this symbol in MySQL queries?
`
For example:
SELECT `show` FROM table WHERE id = "4"
In MySQL the backtick is used to quote column names. It is normally optional but here it is needed because SHOW
is a reserved word.
A list of reserved words can be found here.
There is a difference between quotation marks (' and ") and backticks (`) in mysql.
Backticks are known as an "identifier quote" and are used to surround identifiers, such as:
tables columns indexes stored functions etc.
Quote go around strings, often used when inserting, updating, or trying to match against a string in the database (eg a WHERE clause)
Backticks are known as an "identifier quote" and are used to surround identifiers, such as: you can live without them but but they are necessary when
`customer name
` `name
`