How to delete duplicate records from a table?(for suppose in
a table we have 1000 Records in that we have 200 duplicate
Records , so ,how to findout that duplicate Records , how to
delete those Records and arranged into sequence order? one
more thing that there is no primary key at all)

Answer Posted / sneha

select distinct * from table into new_table;

delete table;

select * from new_table into table;

Is This Answer Correct ?    8 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between function and stored procedure?

514


Can you use order by when defining a view?

575


Is the primary key column of a table an index in ms sql server?

539


What are secondary xml indexes?

568


What is ms sql server index?

565






Tell me what are the essential components of sql server service broker?

510


What does ss stand for sexually?

588


How to count rows with the count(*) function in ms sql server?

538


what's new in sql server 2016?

561


How to recompile stored procedure at run time?

569


While migrating Microsoft SQL Server 2008 database to SQL Azure, what can be done to ensure the database connectivity does not degrade?

87


What are security principals used in sql server 2005?

517


How many types of relations are there between dimension and measure group? : sql server analysis services, ssas

760


How do I find the sql server database version?

532


How to create new databases with "create database" statements?

569