character for single quote

后端 未结 1 1401
夕颜
夕颜 2021-01-28 11:55

(backtick) and \' are two different characters for single quote. I have a mysql script that shows the former two quote characters, if I change them to \', it breaks the syntax.

相关标签:
1条回答
  • 2021-01-28 12:17

    You are referring to the character commonly called a "backtick" (`). It is not a single quote, although in some fonts it can look like one. It has a completely different meaning in MySQL than a single quote, as it is used to escape table and column names, whereas the single quote is used to enclose data values.

    It is at the top-left of your keyboard in all likelihood, often just to the left of the 1 key (as Dav pointed out below, on US keyboard layouts, it's the non-shift version of the tilde (~) key).

    0 讨论(0)
提交回复
热议问题