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

H2-Update mit Beitritt

Probieren Sie so etwas aus:

update table_a a
set a.b_id = (select b.id from table_b b where b.a_id = a.id)
where exists
(select * from table_b b where b.a_id = a.id)