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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -