I have a list of 5 values like (30, 41, 49, 28, 50) and I want to update 5 records in a table with those values. Say my table is currently:
| id | name | age |
|---|---|---|
| 1 | John | 26 |
| 2 | Pete | 39 |
| 3 | Dave | 45 |
| 4 | Mary | 22 |
| 5 | Jane | 42 |
| 6 | Marv | 70 |
I want to insert those new ages in the table above in the order that I've written them for ids 1 to 5, so the table becomes:
| id | name | age |
|---|---|---|
| 1 | John | 30 |
| 2 | Pete | 41 |
| 3 | Dave | 49 |
| 4 | Mary | 28 |
| 5 | Jane | 50 |
| 6 | Marv | 70 |
Not too sure how to go about doing that
30belongs to id=1?