I have a 2 table like this:
table1: (time, value, id) , table2:(time, value, id, ...)
I need to update table1 with a result of a query on table2 based on id, for example the query can be:
SELECT * from table2 where value > 2
and this query returns more than hundreds of rows,
I need update table1 with these rows based on id (set time=q.time, value=q.value where id=q.id) is it possible with sql query?
I don't need UPSERT as I'm sure I have same id in both tables, just need update