php - How do I delete duplicate rows in SQL? -


this question has answer here:

i trying delete duplicate rows using sql, whilst leaving 1 of rows behind.

the table trying delete duplicate rows called table "a" made of:

a.aid, a.bid, a.aname, a.atype, a.aprice. 

in table have number of duplicate rows of data same apart a.id.

i trying create query duplicates , remove duplicate making sure 1 of rows left behind. using phpmyadmin , mysql.

delete member   id in (select *               (select id member                     group member_id, quiz_num, question_num, answer_num having (count(*) > 1)                   )             ); 

use group , count


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -