0

I see the MySQL Reference Manual about JSON Type, when get the element value of the JSON, some use ->>"$.mascot", some use c->>'$.name', which one is better, double quote or single quote ?

I mean the JSON Type as of MySQL 5.7.8, so maybe it's not duplicate of the question 5 years ago.

zhouji
  • 5,056
  • 1
  • 26
  • 26
  • Possible duplicate of [When to use single quotes, double quotes, and backticks in MySQL](https://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks-in-mysql) – Scott Aug 04 '17 at 09:04
  • It's not explicitly explained in the documentation, however, in the documentation the following is indicated: `The key name must be specified within double quotation marks if the name without quotes is not legal within path expressions (for example, if it contains a space).`, see [11.6 The JSON Data Type :: Searching and Modifying JSON Values](https://dev.mysql.com/doc/refman/5.7/en/json.html#json-paths). Here some examples: [db-fiddle](https://www.db-fiddle.com/f/qeX1hJfgbzzRJycy86yYP3/1). – wchiquito Aug 04 '17 at 10:54

0 Answers0