版权声明:本文首发 http://asing1elife.com ,转载请注明出处。 https://blog.csdn.net/asing1elife/article/details/82892848
数据库中如果插入重复记录,需要有效排查出重复结果
更多精彩
- 更多技术博客,请移步 asing1elife’s blog
方法
SELECT
*
FROM
pt_university_institute_staff
WHERE
staffId IN (
SELECT
co.staffId
FROM (
SELECT
staffId, count(*) AS count
FROM
pt_university_institute_staff
GROUP BY
staffId
HAVING
count > 1
) co
);