时间:2021-07-01 10:21:17 帮助过:23人阅读
UPDATE pay_method_basic_info ft INNER JOIN ( SELECT channel_id, method_id, IF ( @channelId = t.channel_id, @row_num := @row_num + 1, @row_num := 1 ) AS row_num, @channelId := t.channel_id FROM pay_method_basic_info t ) mt ON ft.channel_id = mt.channel_id AND ft.method_id = mt.method_id SET ft.method_id = ft.channel_id * 100 + row_num
mysql 按组内顺序 分配序号
标签:sele eth mysql sel 顺序 method basic code join