I am trying to update table A with data from table B. I thought I could do
something like:
UPDATE A
SET A.name = B.name
WHERE A.id = B.id
but alas, this does not work.
Anyone have an idea of how I can do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your query does not work because you have no FROM clause that specifies the tables you are aliasing via A/B.
Please try using the following:
Personally I prefer to use more explicit join syntax for clarity i.e.