Chinaunix首页 | 论坛 | 博客
  • 博客访问: 84447
  • 博文数量: 26
  • 博客积分: 90
  • 博客等级: 民兵
  • 技术积分: 140
  • 用 户 组: 普通用户
  • 注册时间: 2011-12-02 00:25
文章分类
文章存档

2012年(16)

2011年(10)

我的朋友

分类:

2011-12-02 00:26:48

原文地址:mysql关联更新语句 作者:hnynes

近期用到mysql关联更新,发现常规的写法如
update A
set A.name = 'string'
from tablea A inner join tableb B on A.id = B.id
where ...
此种写法在mysql下不正确的,mysql的写法如下
update tablea A inner join tableb B on A.id = B.id
set A.name = 'string'
where ...

记录于此,方便日后查阅
阅读(699) | 评论(1) | 转发(0) |
0

上一篇:没有了

下一篇:mysql 数据导入错误

给主人留下些什么吧!~~

高傲的活着2012-03-31 11:13:51