标签:
删除同一组内其他记录
DELETE from memactivities a where exists
(
select 1 FROM
(select Uuid,ci_no,lst_upd_ts,ROW_NUMBER() OVER(PARTITION BY Uuid order by ci_no) rn from ics.memactivities where uuid is not null)b
where a.Uuid=b.Uuid AND a.lst_upd_ts=b.lst_upd_ts and b.rn<>1
)
标签:
原文地址:http://www.cnblogs.com/dashi/p/4466840.html