Du kan ikke kalde hovedtabellen i en UPDATE-klausul. Dette burde virke:
UPDATE points
SET userid = 5224
WHERE userid = 2532
AND NOT EXISTS (
SELECT 1
FROM points q
WHERE q.userid = 5224
AND q.game = points.game
)
Du kan ikke kalde hovedtabellen i en UPDATE-klausul. Dette burde virke:
UPDATE points
SET userid = 5224
WHERE userid = 2532
AND NOT EXISTS (
SELECT 1
FROM points q
WHERE q.userid = 5224
AND q.game = points.game
)