update shopping_pay_record
set is_return = 1
where is_return = 0
and exists(
select distinct pay_number from shopping_order_settlement
where order_code in
(
select distinct source_code from shopping_order where code in ("0040574")
)
)
and pay_number in
(
select distinct pay_number from shopping_order_settlement
where order_code in
(
select distinct source_code from shopping_order where code in ("0040574")
)
)
mysql update时加了exists后秒出结果,否则需要执行好长时间
于 2024-01-16 15:22:55 首次发布