• +91 9723535972
  • info@interviewmaterial.com

MS SQL Interview Questions and Answers

Question - By Mistake, Duplicate records exists in a table, how can we delete the copy of a record?

Answer -

with T as
(
    select * , row_number() over (partition by Emp_ID order by Emp_ID) as rank
    from employee
)

delete
from T
where rank > 1

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners