sql嵌套更新

原地址:http://blog.csdn.net/ycb1689/article/details/43834445

方法一:

  1. update a set HIGH=b.NEW  from SPEC1 a,tmpDOT  b   
  2. where a.high=b.old 

方法二:

  1. UPDATE A  
  2. SET HIGH=B.NEW  
  3. FROM A LEFT JOIN B ON (A.HIGH=B.OLD)  

方法三:

  1. update  a  
  2.   set high  = (select new from tmpdot where old=a.high  )  
  3.    from spec1 a  
原文地址:https://www.cnblogs.com/zinan/p/6305470.html