mysql update不能直接使用select的结果
来源:互联网 发布:淘宝网店授权书模板 编辑:程序博客网 时间:2024/06/08 16:26
mysql update不能直接使用select的结果在sql server中,我们可是使用以下update语句对表进行更新:update a set a.xx= (select yy from b) ;但是在mysql中,不能直接使用set select的结果,必须使用inner join:update a inner join (select yy from b) c set a.xx = c.yy
例:update mb_tariff a inner join mb_tariff_temp b set a.payment = b.payment where a.mybus_id = b.mybus_id and a.tariff_id = b.tariff_id
自行示例:UPDATE USER INNER JOIN (SELECT id,account FROM USER) c SET user.phone=c.account WHERE user.id = c.id
阅读全文
0 0
- mysql update不能直接使用select的结果
- MySQL update不能直接使用select的结果
- MySQL update不能直接使用select的结果
- mysql update不能直接使用select的结果
- mysql update不能直接使用select的结果
- mysql当中update select结果集
- merge into 当using后的select结果为空时,不能执行update和insert
- mysql select ... update 使用方式
- mysql下使用update set from select
- mysql下使用update set from select
- mysql SELECT FOR UPDATE语句使用示例
- MySQL SELECT FOR UPDATE语句使用示例
- mysql下使用update set from select
- mysql下使用update set from select
- Magento中直接使用SQL语句 select insert update
- mysql update 更新两张表的查询结果
- mysql中update select的值
- MySQL与PostgreSQL的 SELECT FOR UPDATE
- Android Studio 使用教程(十)之和eclipse打包使用同一签名文件
- https ssl证书的工作原理
- 日常训练 20170602 Equation
- rpm -ivh,rpm -e --nodeps ,
- 语义分割
- mysql update不能直接使用select的结果
- 运维基础——Zabbix 设置邮件报警
- icomoon网站辅助HTML页面插入图标①
- HDU 3001 Travelling
- MVC
- Java里两个字符串怎么通过“+”来实现的
- HTML页面件传值方法;seeionStorage;localStorage 存储
- bzoj 1399 坑
- 中缀和后缀表达式之间的转换