In the original text with the SQL statement, delete duplicates only keep one
in thousands of records, there are some same records, how can you use SQL statements, delete duplicates1, duplicate records in the lookup table are judged by a single field (Peopleid) .Select * frompeoplewherePeopleidinch(SelectPeopleid fromPeopleGroup byPeopleid having Count(Peopleid)> 1) 2, delete redundant records in the table, duplicate records are judged by a single field (Peopleid), leaving only the smallest rowID recordsDelete frompeoplewherePeoplenameinch(SelectPeoplename fromPeopleGroup byPeoplename having Count(Peoplename)> 1) andPeopleid not inch(Select min(Peopleid) fromPeopleGroup byPeoplename having Count(Peoplename)>1) 3, finding extra duplicate records in a table (multiple fields)Select * fromVitae awhere(A.PEOPLEID,A.SEQ)inch(SelectPeopleid,seq fromVitaeGroup byPeopleid,seq having Count(*)> 1) 4, delete extra duplicate records (multiple fields) in the table, leaving only the record with ROWID minimumDelete fromVitae awhere(A.PEOPLEID,A.SEQ)inch(SelectPeopleid,seq fromVitaeGroup byPeopleid,seq having Count(*)> 1) androwID not inch(Select min(ROWID) fromVitaeGroup byPeopleid,seq having Count(*)>1) 5, find redundant duplicate records (multiple fields) in the table, and do not contain ROWID minimum recordsSelect * fromVitae awhere(A.PEOPLEID,A.SEQ)inch(SelectPeopleid,seq fromVitaeGroup byPeopleid,seq having Count(*)> 1) androwID not inch(Select min(ROWID) fromVitaeGroup byPeopleid,seq having Count(*)>1) 6. Remove the first bit to the left of a field:UpdateTableNameSet [Title]=right([Title],(Len([Title])-1))whereTitle like 'Village%'7. Eliminate the first bit on the right side of a field:UpdateTableNameSet [Title]=left([Title],(Len([Title])-1))whereTitle like '% Village'8false Delete extra duplicate records (multiple fields) in the table, not including ROWID minimum recordsUpdateVitaeSetIspass=-1wherePeopleidinch(SelectPeopleid fromVitaeGroup byPeopleid
With SQL statements, delete duplicates only keep one