I have an extensive SQL SELECT that performs TotalNetWorth calculations for multiple users. The result is TotalNetworth and User. This may contain multiple entries. Example:
------------------------- |TotalNetWorth | UserId | ------------------------- | 24.45 | 1 | | 45.34 | 3 | -------------------------
What I want to do is update the NetWorth
column in my Users
table with TotalNetWorth
and UserId
= Users.Id
as the key. What is the best way to do this?
source share