- If you want to keep the row with the lowest
id
value:DELETE n1 FROM <table> n1, <table> n2 WHERE n1.id > n2.id AND n1.<column>= n2.<column>
- If you want to keep the row with the highest
id
value:DELETE n1 FROM <table> n1, <table> n2 WHERE n1.id < n2.id AND n1.<column> = n2.<column
No comments:
Post a Comment