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

What is the cartesian product of table?

726


Explain the categories of stored procedure i.e. System stored procedure, local stored procedure, temporary stored procedure, extended stored procedure, remote stored procedure?

747


What are the basic functions for master, msdb, model, tempdb and resource databases?

747


What is join query?

663


What happens if the update subquery returns multiple rows in ms sql server?

787






What are sql server procedures?

731


How to delete database objects with "drop" statements in ms sql server?

768


What is the difference between coalesce() & isnull()?

727


What is the order in which the sql query is executed?

699


How do we Backup SQL Azure Data?

98


Explain what is the main purpose of having conversation group?

694


Why we need sql server?

715


How to insert multiple rows with a subquery?

720


Can you leave a union at any time?

762


Can group by be used without aggregate functions?

672