Write a query to delete duplicate records in SQL SERVER

Answer Posted / mahesh babu ummaneni

inthis we have some steps
-->first rimove duplicate values from table
select distinct * from ta1
-->copy the data into anothetable
select distnice * into tb2 from tb1
-->remove the first table
drop table tb1
-->copy the tb2 data into tb1
select distinct * into tb2 from tb1

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are cursors stored procedures and triggers?

521


What is difference between views and tables?

470


Explain the properties of sub-query in sql server?

514


What are the components of sql server service broker?

512


Explain trigger classes i.e. Instead of and after trigger?

491






How to count duplicated values in a column in ms sql server?

521


How to attach adventureworkslt physical files to the server?

638


Do you know what guidelines should be followed to help minimize deadlocks?

539


Difference between 2NF &3NF ?

683


What is the chart in report?

111


how will add additional conditions in sql?

576


What do you understand by coalesce in sql server?

501


How do you Implement SSIS Packages in your Project?

1513


What is partitioned view?

528


What are the indexes in sql server?

507