当前位置:网站首页>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 14- II. 剪绳子 II
- Sword finger offer 11 Rotate the minimum number of the array
- Flick SQL knows why (10): everyone uses accumulate window to calculate cumulative indicators
- Task5: multi type emotion analysis
- Logback 日志框架
- 常见的几种最优化方法Matlab原理和深度分析
- 2022-02-09 survey of incluxdb cluster
- 8皇后问题
- Road construction issues
- Task6: using transformer for emotion analysis
猜你喜欢
File uploading and email sending
Image component in ETS development mode of openharmony application development
JSP and filter
Kivy教程之 如何自动载入kv文件
已解决(机器学习中查看数据信息报错)AttributeError: target_names
PowerPoint 教程,如何在 PowerPoint 中將演示文稿另存為視頻?
18W word Flink SQL God Road manual, born in the sky
Servlet
IDEA 全文搜索快捷键Ctr+Shift+F失效问题
MySQL_ JDBC
随机推荐
R语言gt包和gtExtras包优雅地、漂亮地显示表格数据:nflreadr包以及gtExtras包的gt_plt_winloss函数可视化多个分组的输赢值以及内联图(inline plot)
The difference between session and cookie
[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [Chapter IV exercises]
Flick SQL knows why (10): everyone uses accumulate window to calculate cumulative indicators
Elk note 24 -- replace logstash consumption log with gohangout
道路建设问题
Server coding bug
剑指 Offer 14- II. 剪绳子 II
Spark实战1:单节点本地模式搭建Spark运行环境
regular expression
2022-02-13 plan for next week
Understanding of CPU buffer line
File uploading and email sending
Multi table query of MySQL - multi table relationship and related exercises
正则表达式
CVPR 2022 | 美团技术团队精选6篇优秀论文解读
Kotlin - improved decorator mode
人身变声器的原理
Task6: using transformer for emotion analysis
【R】 [density clustering, hierarchical clustering, expectation maximization clustering]