1: 2: 3: 4: 5: 6:
create table tmp_dt select orderID, max(cont_date) max_cont_date from contact_history group by orderID ; update orders set order_Date=( SELECT max_cont_date FROM tmp_dt where tmp_dt.orderID=orders.orderID ) ; drop table tmp_dt ;