what I would like to do is to add several sequence numbers to one single sql view in MySQL. Consider the following example table:
Folder 1, File 1
Folder 1, File 2
Folder 2, File 3
Folder 3, File 4
Folder 3, File 5
Folder 3, File 6
因此,我希望得到的结果是:
1, Folder 1, File 1
2, Folder 1, File 2
1, Folder 2, File 3
1, Folder 3, File 4
2, Folder 3, File 5
3, Folder 3, File 6
我知道如何使用变量将一个序列号添加到整个视图中,但我不知道如何解决我的特定问题。希望有人能帮我。
非常感谢!
Cheers, Johannes