http://www.sqltrainingonline.com Delete Duplicates in SQL Server - SQL Training Online
In this video, I show you two different techniques to remove duplicate records in a SQL Server 2012 table.
I don't use the SQL distinct operators, but I actually group the data and apply unique row identifiers to make the SQL delete easier.
Both of the SQL delete statements involve SQL Server CTE statements and use the Row_Number operator to assist in the process. With the operator, you can identify the duplicate rows
You can get the sample script to run the test yourself at http://www.sqltrainingonline.com/how-to-remove-duplicate-rows-in-sql-server/.
Let me know what you think by commenting or sharing on twitter, facebook, google+, etc.
If you enjoy the video, please give it a like, comment, or subscribe to my channel.
You can visit me at any of the following:
SQL Training Online: http://www.sqltrainingonline.com
Mr. Blue, thank you for this wonderful tutorial. I do have a question though. lets say you have semi-duplicate data they both hold the same information, except on may have an extra field or 2 with additional data, how can you combine the two and remove that as a duplicate?
Looking for someone like-minded? Chances are you’ve already got one thing in common.
15,000 New members.
Soulmates sees over 15,000 new faces every month.
#1 Customer service.
Feel safe and secure, with help from our award-winning customer service team.
Recently joined Soulmates.
Meet some of our latest members.
Online Dating Success Stories.
Intrepid explorers who’ve found the person of their dreams.
Kristian & Zoe.
"We met through Soulmates four years ago. Although were both based in London, the chances of us meeting by other means were slim. We just got married! Zoe is the most wonderful woman Ive ever met, and I know we are going to have an extremely happy life together."
Laura & Phil.
"Phil and I got married just over a year after we met on my first ever internet date through Guardian Soulmates. Weve been recommending the site to friends ever since. Thank you!" (Photography credit to Michael OSullivan)
Robin & Alec.
"I just wanted to let you know that you have another success story! My boyfriend, who I met via your site about two years ago, just proposed and we are getting married next year. THANK YOU!"
Alex & Rosie.
"Rosie and I met through Soulmates and were married in October, just 17 months later. Were wonderfully happy together!"
How does it work?
Find your Soulmate in three easy steps.
Register your free account today.