删除重复记录的SQL

DELETE FROM [FLEET_ENGINE] WHERE ID IN (
SELECT
MIN(ID) AS ID
FROM [dbo].[FLEET_ENGINE] group by [FLEET_FK] ,[ENGINE_SERIAL_NUM] having count(1)>1));

你可能感兴趣的:(Mongo-JAVA)