会员
周边
新闻
博问
融资
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
牛粪上的小花
技术改变生活
博客园
首页
新随笔
联系
订阅
管理
UPDATE语句:将一个表里的字段更新到另一个表的字段里的语句
update table2 b,(select b.area_id as arid,sum(a.user_amount) as bcount
from table1 a,table2 b
where a.user_area=b.area_id
group by arid) c
set b.count=c.bcount
where b.area_id=c.arid;
posted @
2015-02-11 20:46
jshaibozhong
阅读(
1059
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告