DELETE A FROM Table_name A JOIN (SELECT id FROM table_name ORDER BY id DESC LIMIT 10,1) B WHERE A.id<=B.id