Sunday, 18 February 2024

delete duplicate records based on the Id

 WITH CTE AS (

    SELECT ProductId,

           -- Add other columns as needed

           ROW_NUMBER() OVER (PARTITION BY ProductId ORDER BY (SELECT NULL)) AS RowNumber

    FROM Master.VehicleType

)

DELETE FROM CTE WHERE RowNumber > 1;

No comments:

Post a Comment

HCL healthcare

 hcl health care f2f second round interview asked more uestions on microservice 1.apim manage all apis in one place 2.sql profiler in one fo...