DELETE FROM bom WHERE Id IN(
  SELECT v.id FROM (SELECT MIN(b.id) id FROM bom b GROUP BY b.FGSFGCode,b.SFGMCode,b.factoryId HAVING COUNT(*) > 1) v)

 

posted on 2021-10-31 23:14  许一朵岁月  阅读(602)  评论(0编辑  收藏  举报