How to do 3 table JOIN in UPDATE query?

后端 未结 6 2039
走了就别回头了
走了就别回头了 2020-11-21 07:00

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.c         


        
6条回答
  •  长情又很酷
    2020-11-21 07:59

    Below is the Update query which includes JOIN & WHERE both. Same way we can use multiple join/where clause, Hope it will help you :-

    UPDATE opportunities_cstm oc JOIN opportunities o ON oc.id_c = o.id
     SET oc.forecast_stage_c = 'APX'
     WHERE o.deleted = 0
       AND o.sales_stage IN('ABC','PQR','XYZ')
    

提交回复
热议问题