Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Tabelle mit SUM aus einer anderen Tabelle aktualisieren

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