So guys, I really do need help with this one:
I have this table:
---------------
mytable
---------------
id col1
1 Winston Churchill
2 Mahatma Ghandi
3 Nnamdi Azikiwe
4 John Kennedy
5 John Paul II
6 Nelson Mandela
7 John Kennedy
8 Mikhail Gorbachev
9 John Kennedy
What I want to do is find rows with duplicated col1
and for each of them, append incremental numbers to the value of col
. In the end, we should be left with this:
---------------
mytable
---------------
id col1
1 Winston Churchill
2 Mahatma Ghandi
3 Nnamdi Azikiwe
4 John Kennedy 1
5 John Paul II
6 Nelson Mandela
7 John Kennedy 2
8 Mikhail Gorbachev
9 John Kennedy 3