日期:2014-05-18 浏览次数:20389 次
DELETE FROM a FROM TollData AS a CROSS JOIN a WHERE EXISTS (SELECT 1 AS Expr1 FROM TollData WHERE (CardID = a.CardID) AND (StCardDate = a.starddate) AND (Balance = a.Balance))
delete from a where id not in (select max(id) from a group by CardID,StCardDate ,Balance )