delete from table1 where EmpID in(select cId from table1 group by cid having count(*) >1)
Here Reader, We are provide all question yhose asked in interview. you are read this blog and prepare for asp.net interview.
get only unique row and delete all duplicate row
delete duplicate value in sql server
DELETE
FROM MyTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY column1,
column
)
Subscribe to:
Posts (Atom)