附录:
ID ColA ColB
1 7 8
2 7 9
3 7 9
4 5 8
5 6 9
6 6 9
7 5 4
The PK is the ID coumn.
Now, I want to delete all duplicates of ColA
and ColB
in consecutive rows.
In this example rows 2,3 and 5,6 contain duplicates. These shall be removed so that the higher ID is remained.
产出应为:
ID ColA ColB
1 7 8
3 7 9
4 5 8
6 6 9
7 5 4
如何用我的SQL来做到这一点?
Thanks, Juergen