Mysql
 sql >> Base de données >  >> RDS >> Mysql

Mettre à jour la table avec SUM d'une autre table

UPDATE playercareer c
INNER JOIN (
  SELECT gameplayer, SUM(points) as total
  FROM games
  GROUP BY gameplayer
) x ON c.playercareername = x.gameplayer
SET c.playercareerpoints = x.total