SQLUSA

Microsoft SQL Server 2000

Best Practices

 

How to eliminate duplicates in a table?

 

This will work for the case the entire row is duplicates (all columns).

select distinct * into WorkTableA from TableA

go

drop table TableA

go

sp_rename WorkTableA, TableA

go

 

Best in the World in SQL Server Training
 
SQLUSA.com Home Page