mysql - Check table_A before updating table_B -
i'm trying make query checks if field 'field_a' in 'table_a' '0' , if is, update 'field_b' in 'table_b' '10'.
i have no idea if possible. have little experience mysql , i'm trying things out. if is, i'd know how done.
update table_b set field_b = 10 exists (select 1 table_a field_a = 0)
Comments
Post a Comment