I have a table that has default 0's for 'value1' and 'value2'. `tableA` ('id', 'stringB', 'value1', 'value2', 'stringB') (1, 'randtxt', 0, 0, 'randtxt'), (2, 'randtxt', 0, 0, 'randtxt'), (7, 'randtxt', 0, 0, 'randtxt'); I have a sql file with the folling structure. INSERT INTO `tableA` ('id', 'value1', 'value2') VALUES (1, 500, 474), (2, 7763, 56754), (7, 4554, 1690); What is the correct structure for replacing the values of 'value1' and 'value2', but leave 'stringA' and 'stringB' alone?
UPDATE tableA SET value1 = 500, value2 = 474; this is the general syntax. probably you would need a WHERE clause too to limit the rows which need to be updated. and if you need to update each row with different value, you'd need some more complicated query...