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?
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?
For
Microsoft Access
I was scratching my head, not being able to get John Sansom's Join syntax work, at least in
MySQL 5.5.30 InnoDB
.It turns out that this doesn't work.
But this works:
The answers didn't work for me with postgresql 9.1+
This is what I had to do (you can check more in the manual here)
You can omit the schema, if you are using the default schema for both tables.
It can be as follows:
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.