mysql update with sum in same table based on conditions code example Example: mysql update sum same table UPDATE products SET quantity = quantity + 10 WHERE id = 8