当前位置: 代码迷 >> Oracle管理 >> 批量更新数据方法,该如何解决
  详细解决方案

批量更新数据方法,该如何解决

热度:95   发布时间:2016-04-24 05:19:47.0
批量更新数据方法
A表和B表:
假设 A表和B表 都有 id 和 number 这两个字段,A表和B表可以通过id字段关联,现在想用B表中的number字段替换到A表的number字段,因为有几万条数据,所以想写个存储过程处理,但是小菜鸟不会写,请各位帮助下,感谢~

------解决方案--------------------
SQL code
update a a set num=(select b.num from b b where a.id=b.id)
  相关解决方案