1. Search for redundant duplicate records in the Table. duplicate records are determined based on a single field (account ).
Select * From myehome where account in (select account from myehome group by account having count (account)> 1)
PS: myehome table name account the field name having count to be re-checked Function
2. Search for redundant duplicate records in the table (multiple fields)
Select * From myehome
Where account in (select account from myehome group by account, name having count (*)> 1) and name in (Select name from myehome group by account, name having count (*)> 1)
PS: query records with duplicate accounts and names at the same time
Two or more fields need to be written after the WHERE clause, because in can only be a single condition. peopleid,. SEQ) in (select peopleid, seq from vitae group by peopleid, seq having count (*)> 1) "is an error. No other simple statements are found.