当前位置:网站首页>mysql中update和select结合使用
mysql中update和select结合使用
2022-07-19 12:45:00 【全栈程序员站长】
大家好,又见面了,我是全栈君。
在遇到需要update设置的参数来自从其他表select出的结果时,需要把update和select结合使用,不同数据库支持的形式不一样,在mysql中如下:
update A inner join(select id,name from B) c on A.id = c.id set A.name = c.name;
根据AB两个表的id相同为条件,把A表的name修改为B的sql语句就如上所示
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/111439.html原文链接:https://javaforall.cn
边栏推荐
- 中科方德系统适配产品(容器类)后谈
- SCCM2012R2网络部署重装系统
- In depth explanation of the development function of Multi Chain Wallet system and analysis of the development principle of multi currency wallet system
- 才22岁!这位'00后'博士拟任职985高校!
- Freeotp installation and use process [easy to understand]
- Ceres曲线拟合
- N皇后问题
- NFT市场格局仍未变化,Okaleido能否掀起新一轮波澜?
- Leetcode | sliding window
- Is CITIC Securities a state-owned enterprise? Is it safe?
猜你喜欢
[special topic of golang database 5] golang language operation redis for addition, deletion, modification and query
About the development of chain game system (analysis and description of the principle of smart contract uplink) - Analysis and cases of the development principle of NFT chain game system
Reflection
In depth explanation of the development function of Multi Chain Wallet system and analysis of the development principle of multi currency wallet system
C# 在Word中添加多行多列文字水印
解决div适应屏幕的一个思路
NFT市场格局仍未变化,Okaleido能否掀起新一轮波澜?
机器学习(1)环境配置
深度详解多链钱包系统开发功能及多币种钱包系统开发原理分析
Iterm2 installation and use
随机推荐
N皇后问题
PostgreSQL 内存暴涨编程总结
面试官:你确定 Redis 是单线程的进程吗?
Pytorch, used by the nonzero instance
Pymongo migrates data from mongodb database
Cuda Error in NCHWToNCHHW2解决
塔望3W消费战略-消费本位研究法:焦点座谈会(Focus Group)
【深度】新派LaaS协议Elephant:重振DeFi赛道发展的关键
Iterm2 installation and use
Leetcode | sliding window
【刷题日记】最长回文子串
【MATLAB项目实战】基于MATLAB的发票识别(含GUI界面)
Ceres之Powell’s Function
25. Inheritance and derivation
文件同步工具 rsync 常用选项使用介绍及通过服务同步数据
Ceres解析求导
15. 简单工资管理系统设计
pytorch,筛选出一定范围的值
mindspore 8卡V100训练到101个epoch的时候报读取数据超时的错误
pytorch,nonzero 实例 使用