我想获取不同idfeedback的行id
SELECT l.idfeedback_store,
@curRow := @curRow + 1 AS row_number
FROM feedback_store l
JOIN (SELECT @curRow := 0) r;
结果
idfeedback_store row_number
1 1
1 2
1 3
2 4
2 5
2 6
2 7
3 8
3 9
3 10
4 11
要求的结果
idfeedback_store row_number
1 1
1 2
1 3
2 1
2 2
2 3
2 4
3 1
3 2
3 3
4 1