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 the class forname () does?

632


How can we migrate from SQL server to SQL Azure?

102


what is the difference in login security modes between v6.5 and 7.0? : Sql server database administration

734


What is difference between equi join and inner join?

552


What is merge?

644






What are the 3 types of schema?

681


What are functions in the sql server?

683


How can you insert null values in a column while inserting the data?

807


Once setting replication, is it potential to own a publisher as sixty four bit sql server and distributor or subscribers as a thirty two bit sql server?

637


How does recursive cte works in sql server?

613


How to delete a database in ms sql server?

639


What is intellisense?

681


How do I view a stored procedure in sql server?

634


Is oracle faster than sql server?

625


What is partitioned view?

596