日期:2014-05-16 浏览次数:20441 次
假设现在有表lefta? 字段id,name
DELETE FROM lefta b WHERE NOT EXISTS (SELECT 1 FROM (SELECT a.rowid,a.*,row_number() OVER (PARTITION BY ID ,NAME ORDER BY ID) num FROM lefta a) WHERE num<=1 AND ROWID = b.ROWID)