write a query to remove duplicate records without using primary key column?

Answers were Sorted based on User's Feedback



write a query to remove duplicate records without using primary key column?..

Answer / 312

351

Is This Answer Correct ?    3 Yes 3 No

write a query to remove duplicate records without using primary key column?..

Answer / mathanrathinam


delete tmp from(select col1,col2,row_number over(partition by col1,col2 order by col1,col2) rownum from tablename) tmp
where rownum >1

Is This Answer Correct ?    7 Yes 8 No

Post New Answer

More SQL Server Interview Questions

What is difference between views and tables?

0 Answers  


what is performance tunning in sql server ? explain.

1 Answers   Thomson Reuters,


What is blocking in SQL Server? If this situation occurs how to troubleshoot this issue

2 Answers   IBM,


What is Pointer ?

3 Answers   Cap Gemini, CarrizalSoft Technologies,


wat is mean by trigger?.......normally wat use......when trigger used in sql........... plz cleary say with example.......

2 Answers   TCS, Wipro,






How to remove duplicate rows from table?

0 Answers  


Questions regarding Raiseerror?

1 Answers  


What is database architecture? : SQL Server Architecture

0 Answers  


How to Generate a Series of Random Integers With T-SQL?

1 Answers  


How to make a column nullable?

0 Answers  


What is a Join in SQL Server?

3 Answers  


What are locks in sql?

0 Answers  


Categories