好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

mysql 分组行号

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

mysql 分组行号

标签:else   from   select   mysq   code   _id   case   group   sele   

查看更多关于mysql 分组行号的详细内容...

  阅读:27次