UPDATE table1 SET price=(SELECT price FROM table2 WHERE table1.id=table2.id);
or,
UPDATE table1 SET table1.price=(SELECT table2.price FROM table2 WHERE table2.id=table1.id AND table2.item=table1.item);
or,
UPDATE event INNER JOIN cualumni ON event.user_id = cualumni.eid SET event.user_id = cualumni.id;
Or,
UPDATE table1 INNER JOIN table2 ON table1.id = table2.id SET table1.Price = table2.price
No comments:
Post a Comment