Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Inner Join Nested Inside Update-Anweisung SQL

Für Updates geben Sie den Join in der Update-Klausel

an
UPDATE
    singulation1.`q096_cq33r08-ds01-n-testtable` AS t1
    INNER JOIN singulation1.`q014_bq31t05-dw30-x` AS t2
      ON t1.print = t2.print AND t1.id3 = t2.id3
SET
    t1.visual = t2.visual
    t1.inspection_status = t2.inspection_status,
    t1.inspector_name = t2.inspector_name