Frage im Vorstellungsgespräch bei IIFL Finance

How to delete duplicate rows form a table?

Antworten zu Vorstellungsgespräch

Anonym

7. Sep. 2018

WITH cte AS ( SELECT empid , name , row_number() OVER(PARTITION BY empid , name order by empid ) AS [rn] FROM dbo.Emp ) DELETE cte WHERE [rn] > 1

Anonym

24. Feb. 2019

Delete from emp where Id in (select id emp group by e id having count (*)>1