当前位置:网站首页>MySQL updates JSON string in array form
MySQL updates JSON string in array form
2022-06-30 03:58:00 【CSDN Q & A】
surface A There is a field in the B The storage is in the form of an array json strand , Such as :
[
{
"id":20190926000000213,
"skuCode":"11108893",
"skuName":" Test the name 1"
},
{
"id":20190926000000214,
"skuCode":"11108892",
"skuName":" Test the name 2"
}
]
Now it needs to be updated in batches skuCode=11108892 Corresponding skuName
Known to be writable sql as follows :
update The name of the table set Field B=replace( Field B,' Test the name 2',' The official name ')
where json_contains( Field B ,json_object('skuCode','11108892'))
Above sql You can find out skucode contain 11109982 And replace the test name 2 Is the official name .
But if there are data as follows :
[
{
"id":20190926000000213,
"skuCode":"11108888",
"skuName":" Test the name 21"
},
{
"id":20190926000000214,
"skuCode":"11108892",
"skuName":" Test the name 2"
}
]
be skucode by 11108888 Of ,name It will also be replaced , Become an official name 1.
I wonder if there is any other plan
边栏推荐
- 【图像融合】基于交叉双边滤波器和加权平均实现多焦点和多光谱图像融合附matlab代码
- Unity 在編輯器中輸入字符串時,轉義字符的輸入
- Ubuntu20.04 PostgreSQL 14 installation configuration record
- UML图与List集合
- . Net 7 JWT configuration is too convenient!
- 【论文阅读|深读】Role2Vec:Role-Based Graph Embeddings
- RPC correction
- Integrating viewbinding and viewholder with reflection
- 使用IDEAL连接数据库,运行出来了 结果显示一些警告,这部分怎么处理
- [Thesis reading | deep reading] dane:deep attributed network embedding
猜你喜欢

11: I came out at 11:04 after the interview. What I asked was really too

(04). Net Maui actual MVVM

【笔记】2022.6.7 数据分析概论
![[note] on May 27, 2022, MySQL is operated through pychart](/img/34/36a3765683b2af485ca7c3e366da59.png)
[note] on May 27, 2022, MySQL is operated through pychart

GIS related data

NER中BiLSTM-CRF解读score_sentence

Node red series (28): communication with Siemens PLC based on OPC UA node
![[note] Introduction to data analysis on June 7, 2022](/img/8b/9119bfdd10227f5c29ca2ece192880.png)
[note] Introduction to data analysis on June 7, 2022
![[image fusion] multi focus and multi spectral image fusion based on cross bilateral filter and weighted average with matlab code](/img/9c/2553d192c2f9b93acc6550220c447f.png)
[image fusion] multi focus and multi spectral image fusion based on cross bilateral filter and weighted average with matlab code

两个月拿到N个offer,什么难搞的面试官在我这里都不算事
随机推荐
Solutions for project paths
(04). Net Maui actual MVVM
Implementation of aut, a self-developed transport layer protocol for sound network -- dev for dev column
各位大佬,flink 1.13.6,mysql-cdc2.2.0,抽取上来的datetime(6)类
Thingsboard tutorial (II and III): calculating the temperature difference between two devices in a regular chain
Magical Union
Jour 9 Gestion des scripts et des ressources
Feign pit
From 2500 a month, no one wants to go to the programming road of the technical director of a large factory | my ten years
laravel9本地安装
【笔记】AB测试和方差分析
Titanic(POJ2361)
[operation] MySQL query operation 2 on May 25, 2022
How to use Jersey to get the complete rest request body- How to get full REST request body using Jersey?
【笔记】2022.5.27 通过pycharm操作MySQL
【云原生】AI云开发平台——AI Model Foundry介绍(开发者可免费体验AI训练模型)
Radiant energy, irradiance and radiance
【论文阅读|深读】DANE:Deep Attributed Network Embedding
[Thesis reading | deep reading] dane:deep attributed network embedding
[Thesis reading | deep reading] role2vec:role based graph embeddings