In my table I have the following columns:
id|name|gender
I would like to extract all the names which are duplicated, but I don't want to scan all the db to count each record one by one...I just want to know who has the same name... Example:
0|mary|F
1|tom|M
2|peter|M
3|mary|F
4|chris|M
5|chris|F
6|alex|M
I just want to get: mary and chris... But I don't want to read all the records at once... any ideas? Thank you.