select DISTINCT t.order_id,t.pay_account,t.sale_price,t.ticket_count,ti.price,ti.handling_fee,t.handling_fee_amount from ts_order t
left join ts_order_ticket_info ti on ti.order_id=t.order_id
left join (select account,vouchers_batch_id from pay_vouchers where vouchers_batch_id=1233 ) p on t.pay_account like CONCAT(p.account,'%')
where ti.price<45 and ti.price+ti.handling_fee >45 and p.vouchers_batch_id=1233
mysql遍历like查询
最新推荐文章于 2024-07-03 03:37:41 发布