Tagged articles
7 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Sep 13, 2022 · Databases

How to Find and Remove Duplicate Rows in SQL

This guide explains how to identify duplicate rows in a MySQL table using GROUP BY and HAVING, how to delete the extra rows while keeping the earliest entry, and how to handle duplicate detection across multiple columns with correct query patterns and common pitfalls.

DELETEGROUP BYHAVING
0 likes · 11 min read
How to Find and Remove Duplicate Rows in SQL
Senior Brother's Insights
Senior Brother's Insights
Oct 28, 2021 · Databases

Why MySQL LIMIT Can Return Duplicate Rows and How to Fix It

In a production environment, a pagination export feature caused duplicate and missing records due to MySQL’s nondeterministic ordering when multiple rows share the same ORDER BY value, and the article explains the root cause, official documentation, and a reliable solution using additional sorting columns.

LIMITMySQLOrder By
0 likes · 10 min read
Why MySQL LIMIT Can Return Duplicate Rows and How to Fix It
Liangxu Linux
Liangxu Linux
Mar 17, 2019 · Databases

How to Find and Remove Duplicate Rows in SQL Tables

This guide explains how to define duplicate rows, use GROUP BY and HAVING to locate them, and apply temporary tables and DELETE statements to remove duplicates while preserving the row with the smallest ID.

DELETEGROUP BYHAVING
0 likes · 11 min read
How to Find and Remove Duplicate Rows in SQL Tables
MaGe Linux Operations
MaGe Linux Operations
Feb 28, 2019 · Databases

How to Find and Remove Duplicate Rows in MySQL

This article shows step‑by‑step how to identify duplicate rows in a MySQL table—whether the duplication is based on a single column, multiple columns, or either column—and provides reliable SQL patterns, including GROUP BY with HAVING, UNION, sub‑queries, temporary tables, and a safe DELETE statement to clean the data.

DELETEGROUP BYHAVING
0 likes · 11 min read
How to Find and Remove Duplicate Rows in MySQL
MaGe Linux Operations
MaGe Linux Operations
Apr 26, 2018 · Databases

Find Duplicate Rows in MySQL: Simple Queries for Beginners

This article shows how to identify and remove duplicate rows in a MySQL table by defining duplication, using GROUP BY with HAVING, creating temporary tables with MIN, and applying various techniques—including UNION, nested subqueries, and joins—to handle single‑column and multi‑column duplicate detection.

Data cleaningGROUP BYHAVING
0 likes · 11 min read
Find Duplicate Rows in MySQL: Simple Queries for Beginners
Qunar Tech Salon
Qunar Tech Salon
Jun 11, 2017 · Databases

Techniques for Removing Duplicate Rows and Adding Unique Constraints in PostgreSQL

This article examines common scenarios where duplicate rows prevent creating unique constraints, presents eight SQL‑based methods—including array functions, window functions, NOT IN/EXISTS, combined IN/NOT IN, EXISTS/NOT EXISTS, single‑statement deletes, and table‑copy approaches—provides test data, performance comparisons, and practical guidance for DBA operations.

Database AdministrationPostgreSQLSQL optimization
0 likes · 10 min read
Techniques for Removing Duplicate Rows and Adding Unique Constraints in PostgreSQL