एक सबक्वेरी का प्रयोग करें:
UPDATE nations
SET count = (
SELECT COUNT(id)
FROM poets
WHERE poets.nation = nations.id
GROUP BY id
);
एक सबक्वेरी का प्रयोग करें:
UPDATE nations
SET count = (
SELECT COUNT(id)
FROM poets
WHERE poets.nation = nations.id
GROUP BY id
);