Lets say you have a table like this
users_cities_relations
|--id--|name|c-id|
|----------------|
| 1 |Tom | 2 |
| 2 |Mike| 3 |
| 3 |Eve | 2 |
| 4 |Tom | 2 |
As you can see the user Tom exists 2 times with the same c-id.
Now what I'm trying to do is to delete one of the rows.
I was thinking of something like :
SELECT id FROM users u1, users u2
WHERE u1.name = u2.name
AND u1.c-id = u2.c-id;
And then delete it with a diffrent statement.
This sadly does not return what I need, if I remember it right, this returned all the id's.