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 normalization? Explain different levels of normalization? : Sql server database administration

0 Answers  


when we use function instead of procedure? plz tell me the situation with ex?

3 Answers   IBM,


How to create a new login name in ms sql server?

0 Answers  


Which command is used for user defined error messages?

0 Answers  


Which system table contains information on constraints on all the tables created?

2 Answers  






What does it mean if @@cursor_row returns a negative number?

0 Answers  


How to make remote connection in database?

0 Answers  


Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?

0 Answers  


What is enhanced database mirroring in sql server 2008?

0 Answers  


How to restart SQL Server in single user mode? How to start SQL Server in minimal configuration mode?

3 Answers   HCL,


What happens if null values are involved in string operations?

0 Answers  


What are the disadvantages of using querystrings to send data from one page to another?

0 Answers  






Categories