What's the best way of finding duplicate data in a table. For instance, I have a 'player' table that contains football players with the fields: id, clubid, squadnumber.
Squadnumbers are non-sequential and can be anything depending on player preference or what is available when he joins the club.
Is there a way of quickly pulling up playerids who have a matching clubid AND squadnumber? Or do I have to loop through each player and check his squadnumber against those in the database?
Squadnumbers are non-sequential and can be anything depending on player preference or what is available when he joins the club.
Is there a way of quickly pulling up playerids who have a matching clubid AND squadnumber? Or do I have to loop through each player and check his squadnumber against those in the database?