(select item_id,count(*) as rowcount from wooods group by item_id having count(*) > 1 );
2.查询相同的纪录:
select a.*,a.rowid from woods a where a.rowid <> (select max(b.rowid) from woods b where b.item_id in (select item_id from temp_woods) where b.item_id = a.item_id) ;
3.删除重复的记录并保留其中rowid列大的纪录:
delete from woods a where a.rowid <> (select max(b.rowid) from woods b where b.item_id in (select item_id from temp_woods) where b.item_id = a.item_id) ;