About 4,990 results
Open links in new tab
  1. sql - Delete duplicate rows keeping the first row - Stack Overflow

    Jul 3, 2017 · To delete the duplicate rows from the table in SQL Server, you follow these steps: Find duplicate rows using GROUP BY clause or ROW_NUMBER() function. Use DELETE …

  2. SQL Query to Delete Duplicate Rows - GeeksforGeeks

    Apr 14, 2025 · In this article, we will explain the process of deleting duplicate rows from a SQL table step-by-step, using SQL Server, with examples and outputs. We’ll cover techniques …

  3. Different ways to SQL delete duplicate rows from a SQL Table

    Aug 30, 2019 · We can use Common Table Expressions commonly known as CTE to remove duplicate rows in SQL Server. It is available starting from SQL Server 2005. We use a SQL …

  4. 3 Ways to Remove Duplicate Rows from Query Results in SQL

    Dec 6, 2023 · The most common way to remove duplicate rows from our query results is to use the DISTINCT clause. The simplest way to use this is with the DISTINCT keyword at the start …

  5. Remove duplicate rows from a table in SQL Server - SQL Server

    Jan 10, 2025 · This article provides a script that you can use to remove duplicate rows from a table in Microsoft SQL Server. There are two common methods that you can use to delete …

  6. sql server - How can I remove duplicate rows? - Stack Overflow

    To Delete the Duplicate Rows: DELETE users WHERE rowid NOT IN (SELECT MIN(rowid) FROM users GROUP BY name, email);

  7. Finding duplicate values in a SQL table - Stack Overflow

    It's easy to find duplicates with one field: So if we have a table. This query will give us John, Sam, Tom, Tom because they all have the same email. However, what I want is to get duplicates …

  8. SQL delete duplicate rows

    Here’s a guide on how to delete duplicate rows in SQL: Identifying Duplicate Rows. Before deleting duplicate rows, you need to identify them. You can use the GROUP BY clause along …

  9. How to Remove Duplicate Records & Data in SQL? A Step-by …

    Feb 9, 2025 · How I Spot Duplicates. Before I clean up duplicates, I need to find them first. Here are my go-to methods: The Simple Way: Using DISTINCT. This is the easiest method I use …

  10. How to Find and Delete Duplicates in SQL - Sqlholic

    Sep 13, 2024 · In this blog post, we’ll explore three methods to find and delete duplicates in SQL: using GROUP BY, subqueries, and Common Table Expressions (CTE). We’ll also provide the …