I have 2 tables — a master and details. It’s a 1-to-many relationship between master and details.
Amongst many other columns, the master table has:
id column (index)
total column
Amongst many other columns, the details table has:
id column (index)
value column
What might the SQL UPDATE statement look like to join these 2 tables together and UPDATE master.total with the sum of details.value where master.id = details.id
Thanks your help.
1 Answer