Jump to content

update table with info in other table


voodoochicken

Recommended Posts

hi, i have a case like this:table table1 (key, accumulator)table table2 (key, counter)i want to, for each table1.key = table2.key, update accumulator with the info in counter, something like this:update table1 set accumulator=accumulator+table2.counter where (? counter is the value related with the same key as the one in table1)how do you write a sentence like this one?tnx------(EDIT) note: not all keys in table1 are present in table2

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...