update xxx a
INNER JOIN xxx b on a.name = b.name
set a.id = b.id
where b.del = 0

Q.E.D.


夜阑卧听风吹雨,铁马冰河入梦来。