i have table A
mem_id | temp_id | version
--------------------------
1 | 1008 | 1
2 | 1009 | 1
3 | 1010 | 1
4 | 1021 | 1
and table B
temp_id | base id | desc
--------------------------
1008 | 720 | GP
1009 | 720 | GP
1010 | 720 | GP
1021 | 720 | GP
I want to do an update statement that will update the temp_id for all mem_id in table A to only temp_id = 1008.
update table a
set a.temp_id = (minimum of temp_id in table b)
where a.temp_id in (select temp_id in table b where b.tempid (min)
i want it to check for the minimum value in table b_temp_id and then set all values in table A_temp_id to be the same.
update a set temp_id = 1008 where temp_id = 1008? That makes no sense. Please show the table A content after the update.