一意のインデックスを追加します テーブルの上:
ALTER IGNORE TABLE `TableA`
ADD UNIQUE INDEX (`member_id`, `quiz_num`, `question_num`, `answer_num`);
これを行う別の方法は次のとおりです。
テーブルに主キーを追加すると、次のクエリを使用してテーブルから重複を簡単に削除できます。
DELETE FROM member
WHERE id IN (SELECT *
FROM (SELECT id FROM member
GROUP BY member_id, quiz_num, question_num, answer_num HAVING (COUNT(*) > 1)
) AS A
);