I have a table named 'DATAENTRY' with the following columns
- Title
- FName
- MName
- LName
- Add1
- Add2
- Add3
- City
Now I want to select records which have different (FName, MName ,LName) so I tried
SELECT DISTINCT FName, MName, LName FROM dataentry
The problem is that I want full records with all columns but they should be unique across (FName, MName, LName)
I can't use
SELECT DISTINCT Title, FName, MName, LName, Add1, Add2, Add3, city FROM dataentry
because two records with same values in (FName, MName, LName) but with different values in Title or Add1 will be treated as distinct records.