2014年7月7日 星期一

Update Mysql table with another table’s data

 

update gmd.gmd_adnum_resource as a inner join (select uid,adnum,pbxid,e1Id,status,serverId from gmd.gmd_g9port_adnum_resource) as g on a.adnum=g.adnum and a.serverId=g.serverId and g.status='IN_USE' 
set a.pbxid=g.pbxid,a.e1Id=g.e1Id,a.g9PortREsourceId=g.uid,a.status='IN_USE'