MySQL 5.7.8 and later began to support a native JSON type that can efficiently obtain data in JSON text. This type has the following advantages:
In addition, the system has some restrictions on the JSON format:
Problems encountered when inserting json data You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{ Insert code insert into `players` (`id`,`player_and_games`) values(1,{ "id":1, "name":"aaa", "games_played":{ "Battlefieldld":{ "weapon":"adsf", "level":20 }, "Crazy":{ "weapon":"adsf", "level":20 } } }) There is a problem, json does not use quotes, the correct way is as follows insert into `players` (`id`,`player_and_games`) values(1,'{ "id":1, "name":"aaa", "games_played":{ "Battlefieldld":{ "weapon":"adsf", "level":20 }, "Crazy":{ "weapon":"adsf", "level":20 } } }') Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: The principle and application of ES6 deconstruction assignment
>>: Detailed explanation of the use of umask under Linux
The google.html interface is as shown in the figur...
Table of contents 1. What is a calculated propert...
1. Rounded Corners Today's web designs are con...
MySQL foreign key constraint (FOREIGN KEY) is a s...
<br />Introduction: This idea came to me whe...
View the IP address of the Container docker inspe...
Custom Image FAQ How to view the data disk? You c...
PHP7 has been out for quite some time, and it is ...
Preface Sometimes file copies amount to a huge wa...
<br />Related articles: 9 practical suggesti...
Table of contents 1. Characteristics of JS 1.1 Mu...
This article example shares the specific code of ...
Table of contents introduce Support Intel CPU Sup...
Install GeoIP on Linux yum install nginx-module-g...
<br />We have always emphasized semantics in...