I have a table and I want to copy my row with some id to other rows in the same table. Any suggestions on best practices? How to make Bulk update?
example:
| id | foreign_key_id | param_a | param_b | created_at | updated_at |
| 1 | 23 | 23 | 44 | 2022-05-30 | 2022-05-30 |
| 2 | 35 | 32 | 22 | 2022-05-30 | 2022-05-30 |
| 3 | 13 | 12 | 33 | 2022-05-30 | 2022-05-30 |
| 4 | 12 | 33 | 11 | 2022-05-30 | 2022-05-30 |
| 5 | 55 | 18 | 22 | 2022-05-30 | 2022-05-30 |
I want to update rows with foreign_key_id 12
and 13
with the values of 23
for param_a
and param_b
.