标签:else from select mysq code _id case group sele
select
id,
@group_row:=CASE when @parent_code=a.staff_id then @group_row+1 else 1 end as groupRow,
@parent_code:=a.staff_id as parent_code
from ss_staff_ctrt a ,( select @group_row:=1, @parent_code:=‘‘) as b
ORDER BY a.staff_id
标签:else from select mysq code _id case group sele
原文地址:https://www.cnblogs.com/Logan626/p/14541399.html