Say, I have a table with 4 columns. The first 2 columns are sourced from a feed. The columns value1 and value2 I need to update using results from API requests. The values from the API request should go into value1 and value2
+---------+------+-------+-------+
| prod_id | name | value1| value2|
+---------+------+-------+-------+
| 1105 | aat | | |
| 1108 | bbv | | |
| 1111 | ccq | | |
| 1116 | dde | | |
| 1123 | iir | | |
| 1125 | jjm | | |
+---------+------+-------+-------+
For example the API request gives me these values:
1108, banana, apple
1116, cucumber, pineapple
1123, orange, melon
So in this example I would like to update these 3 records, but in my case I would have update around 1000-2000 records at a time.
+---------+------+--------+----------+
| prod_id | name | value1 | value2 |
+---------+------+--------+----------+
| 1105 | aat | | |
| 1108 | bbv |banana |apple |
| 1111 | ccq | | |
| 1116 | dde |cucumber|pineapple |
| 1123 | iir |orange |melon |
| 1125 | jjm | | |
+---------+------+--------+----------+
How would I be able to update, say 2000 records using only one or a handful of queries? Would I need to use a temporary table or is there a way to do without?