答案 0 :(得分:1)
像这样:
delete A from TableX A
left join TableX B
on B.CallDate>A.CallDate and B.PhoneCall=A.PhoneCall
where B.PhoneCall is not null
答案 1 :(得分:0)
这可能有效:
delete callLog
from callLog
inner join (
select max(CallDate) as lastCallDate, PhoneCall
from callLog
group by PhoneCall
having count(*) > 1) duplic on duplic.PhoneCall = callLog.PhoneCall
where callLog.CallDate < duplic.lastCallDate;