mysql - Update and join query -


i had table named stores column named id had values updated user_id values user table.

update stores s join users u on u.user_id = s.id set s.id = u.user_id s.id = 100; 

but above query no change column values of s.id.

you can avoid on condition since limiting result 1 id, forthermore if tell database id same id in other table couldn't expect change. selecting id same table want perform update think meant select table users

update stores s join users u  set s.id = u.user_id u.user_id = 100; 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -