delete from tablename where id not in (select max(id) from tablename group by column1,column2...)
其中tablename为要操作的表,id为假设的表中某一唯一字段,column1~2...为表中的列,关键是group by
还可以间隔临时表,但是那样就太麻烦,复杂了!
delete from tablename where id not in (select max(id) from tablename group by column1,column2...)
其中tablename为要操作的表,id为假设的表中某一唯一字段,column1~2...为表中的列,关键是group by
还可以间隔临时表,但是那样就太麻烦,复杂了!