(select item_id,count(*)as rowcount from wooods groupby item_id havingcount(*)> 1 );
2.查询相同的纪录:
select a.*,a.rowidfrom woods a where a.rowid<>(selectmax(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列最大的纪录:
deletefrom woods a where a.rowid<>(selectmax(b.rowid)from woods b where b.item_id in(select item_id from temp_woods)where b.item_id = a.item_id);