发布网友 发布时间:2024-09-28 07:53
共4个回答
热心网友 时间:2024-12-14 20:46
这样的问题解决应该用存储过程来实现,先用disticnt读出单一的客户编码,然后逐条删除,保留最新的纪录。热心网友 时间:2024-12-14 20:46
Delete From Sa_Cusuprice热心网友 时间:2024-12-14 20:47
delete a from SA_CusUPrice a where not exists (select 1 from (select ccusccode,cinvcode,max(dstartdate) dstartdate from SA_CusUPrice group by ccusccode,cinvcode) b where a.ccusccode = b.ccusccode and a.cinvcode=b.cinvcode and a.dstartdate =b.dstartdate )热心网友 时间:2024-12-14 20:47
百度搜下“sql 删除 重复记录”有很多方法!