阅读背景:

mysql update sql

来源:互联网 
select userno,sum(small_posttaxprize) t1 from lottery_order where order_result_status in (3,4) group by userno ; select userno, sum(commisionPrizeAmt+prizeAmt) t2 from lottery_caselot_buy group by userno; select userno,sum(small_posttaxprize) total from lottery_order where order_result_status in (3,4) group by userno; update user_account a inner join (select userno,sum(small_posttaxprize) total from lottery_order where order_result_status in (3,4) group by userno) c set total_prize_amt=c.total wherhere a.userno=c.userno; update user_account a inner join(select * from(select userno, sum(commisionPrizeAmt+prizeAmt) total from lottery_caselot_buy group by userno having total>0) t)tt set total_prize_amt=total_prize_amt+tt.total where a.userno=tt.userno;select userno,sum(small_posttaxprize) t1 from lot


你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: