DELETE patients FROM patients pt WHERE EXISTS ( SELECT * FROM patients WHERE mpinumber = pt.mpinumber AND PatientID < pt.PatientID)>I have a table that I need to identify duplicate entries based off the value of a single column, and delete all but one of the duplicate entry records.
>delete from patients > where (PatientID, mpinumber) > not in > ( select min(PatientID), mpinumber > from patients group by mpinumber) >>