UPDATE orders LEFT JOIN freports ON freports.order_id = orders.id set orders.finish_at = freports.created_at where orders.id in(1,2,3)