how to delete duplicate rows in sql server2005

Answer Posted / pritesh

By using temporary table, But it will delete exactly
duplicate rows NOT RECOMMANDABLE FOR HUGE TABLE. Query will
be.

SELECT DISTINCT * INTO #A FROM TABLE1

TRUNCATE TABLE TABLE1

INSERT INTO TABLE1
SELECT * FROM #A

Is This Answer Correct ?    30 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are horizontal and vertical scaling?

144


Where does the copy job runs in the log shipping primary or secondary? : sql server database administration

594


What is data compression?

545


Name 3 ways to get an accurate count of the number of records in a table?

565


I have a table Events Events containing cardno,time,id,name--each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible

1790






Explain the dirty pages?

571


What is indexing explain it with an example?

548


What is inline variable assignment?

595


whats the maximum size of view state??

1714


What is index, cluster index and nonclustered index?

511


What are logical database components? : SQL Server Architecture

475


What do you understand by mirroring?

562


Describe in brief sql server monitoring ways.

583


How to modify an existing user defined function?

589


How to test a dml trigger in ms sql server?

572