Home > database >  How will the mysql nested json data updated
How will the mysql nested json data updated

Time:10-21

 {
"Data" : [
{
"Id" : 0,
"Name" : "1" favourite,
"Remark" : "drink",
"Temperature" : 10
},
{
"Id" : 1,
"Name" : "2" favourite,
"Remark" : ", "
"Temperature" : 20
},
{
"Id" : 2,
"Name" : "favourite 3 CD",
"Remark" : ", "
"Temperature" : 31
},
],
"Current" :
2}


Field storage format as current is the value of the currently selected data array under the object id=2;
Excuse me I have to update the current (not necessarily 2) corresponding to the object's temperature is 99;
Please write a SQL statement, a great god grateful,,,

CodePudding user response:

If put the string into a column, still use the program to update the Java, with complex SQL is a waste of SQL performance,

Put the result set in the library is not recommended, if you want to put, the archive, just try not to read and write,
  • Related