deletefrom APPTEST a where rowid notin (selectmax(rowid) from APPTEST b where a.mobile=b.mobile);
据说,这种方法在数据量很大时,效率并不高 (2)利用分析函数
delete APPTEST where rowid in ( select rid from (select rowid rid,row_number() over(partition by mobile orderby id desc) rn from APPTEST ) where rn >1) ;