I asked a question and got this reply which helped.
UPDATE TABLE_A a JOIN TABLE_B b
ON a.join_col = b.join_col AND a.column_a = b.column_b
SET a.column_c = a.column_c + 1
Now I am looking to do this if there are 3 tables involved something like this.
UPDATE tableC c JOIN tableB b JOIN tableA a
my question is basically... is this possible to do 3 table join on an UPDATE
statement? and what is the correct syntax for it? Thank you. Do i do the...
JOIN tableB, tableA
JOIN tableB JOIN tableA
An alternative General Plan, which I'm only adding as an independent Answer because the blasted "comment on an answer" won't take newlines without posting the entire edit, even though it isn't finished yet.
Example:
For PostgreSQL example:
the answer is
yes
you cantry it like that
EDIT:
For general Update join :
Alternative way of achieving same result is not to use
JOIN
keyword at all.Below is the Update query which includes
JOIN
&WHERE
both. Same way we can use multiple join/where clause, Hope it will help you :-