In SQL Server, I can copy one table into another by doing:
Select * into desttable from sourcetable
However, there are duplicate rows in sourcetable and I would like to just copy distinct rows. How do I do this?
Thanks
sql serversql-server-2008
In SQL Server, I can copy one table into another by doing:
Select * into desttable from sourcetable
However, there are duplicate rows in sourcetable and I would like to just copy distinct rows. How do I do this?
Thanks
Best Answer
If they are true EXACT duplicates, you can do:
If they aren't exact dupes in every single field, then we need more info.