![delete duplicate records from file](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT4L03pi1i_Mb2FfZx06UhHPUmLXadO0Hox5uzQMrwlZT47L4lMiWtDcjnKCchZMJXIplPVO477bdGW7PEsswv8yhU-lPlMuNc9oB9ieOVCMEQUrTLQOeSCbRZenrYJDd-GNEGHKyWh4ty/s200/rpg.png)
How to remove duplicate records from a file? is a question I have been asked by so many different people I feel that it must be on one of those interview questions lists. What I mean by duplicate records is where there is more than one record in a file were values in all are the same as another record. I do not mean records with duplicate keys, as that is whole other "can of worms".
In a well built database each "master" file or table should have a unique key, which prevents duplicate keys and records: