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
Table of contents Preface need accomplish First R...
Theoretically, the memory used by MySQL = global ...
This article shares the manual installation tutor...
<br />The content is reproduced from the Int...
Generally speaking, after the container is starte...
ScreenCloud is a great little app you didn’t even...
1. Introduction Vagrant is a tool for building an...
1: Install SVN yum install -y subversion 2. Creat...
Firewall A firewall is a set of rules. When a pac...
title: vue uses vue-meta-info to set the title an...
1 What is BEM Naming Standard Bem is the abbrevia...
Preface It is very simple to create a server in n...
Suppose we have n items and we have to sort these...
This article will use Docker containers (orchestr...
Table of contents Scenario Task idea analyze Conc...