SQL语句之查找重复记录和唯一记录
查找唯一记录
SELECT DISTINCT * FROM people;
查找重复记录
SELECT * FROM people WHERE peopleID in ( SELECT peopleID FROM people GROUP BY peopleID HAVING count(peopleID)>1);
2021-08-30 22:13:35
查找唯一记录
SELECT DISTINCT * FROM people;
查找重复记录
SELECT * FROM people WHERE peopleID in ( SELECT peopleID FROM people GROUP BY peopleID HAVING count(peopleID)>1);
2021-08-30 22:13:35