日期:2014-05-18  浏览次数:20517 次

如何批量修改数据?
SQL code
SELECT  dbo.cj.cjid, dbo.xs.xsid AS xsxsid, dbo.xs.xuehao, dbo.cj.xsid
FROM  dbo.xs INNER JOIN
dbo.cj ON dbo.xs.xuehao = dbo.cj.xuehao

如何update cj set cj.xsid=xs.xsid

------解决方案--------------------
SQL code
update dbo.cj set dbo.cj.xsid=xs.xsid
from dbo.xs
where dbo.xs.xuehao = dbo.cj.xuehao

------解决方案--------------------
update cj set cj.xsid=xs.xsid
FROM dbo.xs INNER JOIN
dbo.cj ON dbo.xs.xuehao = dbo.cj.xuehao


------解决方案--------------------
探讨
2楼和1楼有何区别?