UPDATE table_B t1
INNER JOIN (
SELECT
*
FROM
table_A tt
WHERE
tt.order_info_id IN (
SELECT DISTINCT
order_info_id
FROM
table_B
)
) t2 ON t1.order_info_id = t2.order_info_id
SET
t1.order_create_time = t2.create_time,
t1.order_begin_time = t2.begin_date,
t1.order_end_time = t2.end_date;
mysql 将A表中的数据更新到B表中
最新推荐文章于 2024-07-22 15:41:23 发布