当前位置:网站首页>When updating mysql, the condition is a query
When updating mysql, the condition is a query
2022-07-03 13:24:00 【Vogat meets grapefruit】
scene :
surface A Business unit table
There are business unit name and business unit code .
surface B Application table
It stores its own data and business unit name , Business unit code .
problem : surface B The business unit code in is wrong , Now I want to modify and table A The business unit codes in are consistent . Two tables can be associated by business unit name .

solve :
surface A And table B By business unit name (unit_name) Association as update condition
UPDATE uop_achieve ua,
sys_business_unit sbu
SET ua.unit_code = sbu.unit_code
WHERE
sbu.unit_name = ua.unit_name
边栏推荐
- SSH login server sends a reminder
- Setting up remote links to MySQL on Linux
- Flink SQL knows why (13): is it difficult to join streams? (next)
- Logseq 评测:优点、缺点、评价、学习教程
- Asp.Net Core1.1版本没了project.json,这样来生成跨平台包
- Task6: using transformer for emotion analysis
- Fabric. JS three methods of changing pictures (including changing pictures in the group and caching)
- Useful blog links
- 已解决TypeError: Argument ‘parser‘ has incorrect type (expected lxml.etree._BaseParser, got type)
- Server coding bug
猜你喜欢

February 14, 2022, incluxdb survey - mind map

Flink SQL knows why (17): Zeppelin, a sharp tool for developing Flink SQL

人身变声器的原理

Libuv库 - 设计概述(中文版)

Mysql database basic operation - regular expression

Introduction to the implementation principle of rxjs observable filter operator

道路建设问题

Resolved (error in viewing data information in machine learning) attributeerror: target_ names

Comprehensive evaluation of double chain notes remnote: fast input, PDF reading, interval repetition / memory

Sword finger offer 14- ii Cut rope II
随机推荐
regular expression
AI 考高数得分 81,网友:AI 模型也免不了“内卷”!
The 35 required questions in MySQL interview are illustrated, which is too easy to understand
JS 将伪数组转换成数组
2022-02-09 survey of incluxdb cluster
JS convert pseudo array to array
In the promotion season, how to reduce the preparation time of defense materials by 50% and adjust the mentality (personal experience summary)
[today in history] July 3: ergonomic standards act; The birth of pioneers in the field of consumer electronics; Ubisoft releases uplay
Swiftui development experience: the five most powerful principles that a programmer needs to master
人身变声器的原理
Kivy tutorial how to automatically load kV files
MapReduce实现矩阵乘法–实现代码
untiy世界边缘的物体阴影闪动,靠近远点的物体阴影正常
MyCms 自媒体商城 v3.4.1 发布,使用手册更新
Sword finger offer 17 Print from 1 to the maximum n digits
【R】 [density clustering, hierarchical clustering, expectation maximization clustering]
Sword finger offer 14- I. cut rope
物联网毕设 --(STM32f407连接云平台检测数据)
Reptile
父亲和篮球