YOUR AD GOES HERE

Delete duplicate rows in sql | Select records with highest salary from duplicate records

Published 16, Mar 2020

kumar


Description:
#Howtodeleteduplicaterowsi sql | Identify duplicate rows in sql server | #Selectrecordswithhighestsalaryfromduplicaterecords|#Deleteduplicaterowsinsql
# https://youtu.be/XcxfugISRDk

--------------------------------------------------------------------------------------------------------------------------
SELECT id, name, salary
FROM (SELECT id, name, salary,
RANK() OVER (PARTITION BY name ORDER BY salary DESC) rk
FROM some_table) t
WHERE rk = 1
-----------------------------------------------------------------------------------------------------------
DELETE F FROM (SELECT*,ROW_NUMBER()OVER(PARTITION BY ENO ORDER BY SALARY DESC) AS ID FROM SAL) F WHERE ID =|1
--------------------------------------------------------------------------------------------------------------------
DELETE F FROM(SELECT *,DENSE_RANK()OVER(PARTITION BY ENO ORDER BY SALARY DESC) AS ID FROM SALARY) F WHERE ID 1

Releted More Videos

  • Sorry!!! Nothing to show

You May Also Like

YOUR AD GOES HERE

YOUR AD GOES HERE