问题
UPDATE
t1
SET
t1.name=t2.name, t1.fb_id=t2.fb_id
FROM
nullemail t1
INNER JOIN run1 t2
ON t1.email=t2.email;
Can someone please tell me what is wrong with this syntax? I have 2 tables. nullemail and run1. I want to update nullemail's columns(fb_id
and name
) when the email id in nullemail is the same as run1.
回答1:
UPDATE nullemail t1, run1 t2 SET t1.name=t2.name, t1.fb_id=t2.fb_id
where t1.email=t2.email;
Try this
来源:https://stackoverflow.com/questions/17802921/sql-syntax-update-after-inner-join