I have been trying to solve my problem but could not find the answer. Oracle db.
I have table context with looks like:
| contextId | customer |
----------------------
| 1 | John |
| 2 | David |
I have another table setting:
| contextId | settingName | settingValue |
----------------------------------------
| 1 | Happiness | 6 |
| 1 | Sadness | 3 |
What I would like is to insert David in setting, while copying the settingName and settingValue of John (contextId = 1).
Result should look like:
| contextId | settingName | settingValue |
----------------------------------------
| 1 | Happiness | 6 |
| 1 | Sadness | 3 |
| 2 | Happiness | 6 |
| 2 | Sadness | 3 |
Thanks