How to remove the second repetition of combination in mySQL I have a datable like above and in that, unfortunately, repetitions occurs. How can I remove the repeated combination of 2nd, 3rd and 4th column and I need to make those three columns unique in combination.

Please help to write a query to do this, because there are 13000+ rows, so manual editing is hardly not possible.

Thanks in advance!
Try this

DELETE n1
    FROM tablename n1, tablename n2
    WHERE n1.id &gt; n2.id
      AND n1.exam = n2.exam
      AND n1.name = n2.name
      AND n1.subject = n2.subject