UPDATE t_in_collect_log LOGINNER JOIN ( SELECT invoice_number, gmt_created, gmt_modified FROM t_in_collect_invoice temp ) c ON log.invoice_number = c.invoice_number SET log.gmt_created = c.gmt_created,log.gmt_modified = c.gmt_modified