|
SQL: making queries from multiple tables
I have never encountered a similar situation before, and I cannot find relative documentation:
Suppose I have two tables. For simplicity, suppose that on one table (which is temporary) I have these columns: name, votes
And suppose that on the other table i have: name, total_votes, and other updated details (this table is a permanent up2date version of first table).
My aim is that for each name in table 1, I grab the relative "votes" value and inject it in Table 2 with the matching "name" column replacing the previous "total_votes' value...
How can I do it?
|