摘要:
转自:http://hi.baidu.com/shallinyao/blog/item/a3b894cf925a3e0b92457e91.html我们经常会遇到需要将一个表中某些字段的值批量更新到另一个表的对应记录下的对应字段中去的情况。MS SQL Server的语法:update t1 set t1.tValue = t2.tValuefrom t1inner join t2 on t1.id = t2.id例子:update areaset area_phone_code = z.codefrom areainner join test.zipcode zon z.areaid = a. 阅读全文