更新时间:2022-03-09 02:00:13
数据库中如果插入重复记录,需要有效排查出重复结果
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
);