22,209
社区成员
发帖
与我相关
我的任务
分享
exec sp_MSforeachtable
@whereand=' and o.name like "Z_00%"'
,@command1='delete from ?
where ftime in (select ftime from ? group by ftime having count(ftime) > 5)
and id not in (select MIN(id) from ? group by ftime having count(ftime) > 5)'