Let's say we have this data:
rc_id phonenumber 1 0 2 0 5 1 5 3 5 3 5 3 and I want to delete records matching rc_id of 5 and phonenumber of 3 while keeping at least 1 of them
The final result should be:
rc_id phonenumber 1 0 2 0 5 1 5 3 Note: I don't want to use an unique identifier
I'm using this statement at the moment, but I noticed this deletes all other duplicates as well.
cmd.CommandText = "DELETE FROM tbl_data WHERE rc_id='5' AND phonenumber='3'";
WHEREclause. It used aGROUP BYwhich I don't know how it works. I think the OP in there wants to delete any duplicates in the entire DB