sql语法:从一个表update到另外一个表

sql语法:从一个表update到另外一个表

一、

update a 
   set a.name=b.name1 
from a,b 
where a.id=b.id

 

二、

update   table1   
   set  a.status = b.status   
from   table1   a   
inner   join   table2 b on a.idl = b.idl

 

posted @ 2018-03-14 13:29  麦麦提敏  阅读(1189)  评论(0编辑  收藏  举报