您的位置:首页 > 其它

根据一个表更新另一个表的内容

2010-05-28 13:20 323 查看
 

sql

update

Table1

set

Table1.co1=Table2.co1,

       Table1.co2=Table2.co2

from

Table2

where

Table2.id=Table1.id

 

 

mysql

 

 

update student s, city c

set s.city_name = c.name

where s.city_code = c.code;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  table c