Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- insert into venda_produto (`cod`,`estoque`)
- values (49477,`estoque`+3), (98798,`estoque`+6)
- on duplicate key update `cod`=COALESCE( VALUES(`cod`), `cod`),`estoque`=COALESCE( VALUES(`estoque`), `estoque`)
- INSERT INTO vendo_produto (cod, estoque)
- VALUES (49477, 3), (98798, 6)
- ON DUPLICATE KEY UPDATE estoque = estoque + VALUES(estoque);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement