当前位置:网站首页>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
边栏推荐
- 正则表达式
- 剑指 Offer 16. 数值的整数次方
- Typeerror resolved: argument 'parser' has incorrect type (expected lxml.etree.\u baseparser, got type)
- MySQL constraints
- Sword finger offer 11 Rotate the minimum number of the array
- 2022-01-27 research on the minimum number of redis partitions
- Elk note 24 -- replace logstash consumption log with gohangout
- In the promotion season, how to reduce the preparation time of defense materials by 50% and adjust the mentality (personal experience summary)
- 2022-02-13 plan for next week
- MySQL_ JDBC
猜你喜欢

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

解决 System has not been booted with systemd as init system (PID 1). Can‘t operate.

已解决(机器学习中查看数据信息报错)AttributeError: target_names

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

The 35 required questions in MySQL interview are illustrated, which is too easy to understand

Some thoughts on business

OpenHarmony应用开发之ETS开发方式中的Image组件

Typeerror resolved: argument 'parser' has incorrect type (expected lxml.etree.\u baseparser, got type)

(first) the most complete way to become God of Flink SQL in history (full text 180000 words, 138 cases, 42 pictures)

显卡缺货终于到头了:4000多块可得3070Ti,比原价便宜2000块拿下3090Ti
随机推荐
【电脑插入U盘或者内存卡显示无法格式化FAT32如何解决】
The difference between stratifiedkfold (classification) and kfold (regression)
CVPR 2022 image restoration paper
rxjs Observable filter Operator 的实现原理介绍
Sitescms v3.1.0 release, launch wechat applet
Fabric. JS three methods of changing pictures (including changing pictures in the group and caching)
R语言使用data函数获取当前R环境可用的示例数据集:获取datasets包中的所有示例数据集、获取所有包的数据集、获取特定包的数据集
Comprehensive evaluation of double chain notes remnote: fast input, PDF reading, interval repetition / memory
MySQL constraints
sitesCMS v3.0.2发布,升级JFinal等依赖
JS convert pseudo array to array
Flink SQL knows why (VIII): the wonderful way to parse Flink SQL tumble window
Asp.Net Core1.1版本没了project.json,这样来生成跨平台包
剑指 Offer 17. 打印从1到最大的n位数
The shortage of graphics cards finally came to an end: 3070ti for more than 4000 yuan, 2000 yuan cheaper than the original price, and 3090ti
My creation anniversary: the fifth anniversary
开始报名丨CCF C³[email protected]奇安信:透视俄乌网络战 —— 网络空间基础设施面临的安全对抗与制裁博弈...
Today's sleep quality record 77 points
Annotation and reflection
Luogup3694 Bangbang chorus standing in line