Remove duplicate entries / rows a mySQL database table

Monday, December 22, 2008 18:35
Posted in category MySql

This is an extremely quick and painless way to remove duplicate rows (tuples) from a MySQL database table. The best part of it is that it requires no programming or PHP coding whatsoever, it can all be done with three manual SQL queries! Note: this only works on MySQL 3.23 and above. But I have a hard time imagining anyone running an older version than that anyways!

So, there are 3 steps, and therefore 3 SQL statements:


Read the rest of this entry »

delete duplicate rows in mysql using php

Monday, December 22, 2008 18:29
Posted in category MySql, PHP

delete duplicate rows in mysql using php


Read the rest of this entry »

Mysql remove duplicate data or rows with DISTINCT

Monday, December 22, 2008 18:23
Posted in category Database, MySql

. How do I remove duplicate data or rows from a MySQL query?

A. If output from a MySQL query contains duplicate data or row and if you would like to remove the same use DISTINCT.


Read the rest of this entry »

Temporary Tables, SubQueries and Removing Duplicate Records - MySQL 5

Monday, December 22, 2008 15:32
Posted in category Oracle

Sometimes it’s just not wise to work on a database after midnight when your senses are not fully alert!

Anyhow, I don’t know how I did this but I inserted 7,000+ records for a single content type (restaurants) half of which were duplicate entries.

Read the rest of this entry »

How to Delete Duplicate Records?

Sunday, December 21, 2008 19:58
Posted in category MySql

In a MySQL (3.22.51) file I have three fields

idx (Auto Increment)
filename
pathname

I use an insert command in a dump.sql file to add new records to my file.

INSERT INTO jpeglist (idx, filename, pathname) VALUES ( ”, ‘c-purpsparkle26w-1.jpg’, ‘dennisj/20021007′);

Sometimes I end up adding the same record twice.

How can I find all duplicate records in Field ‘filename’ and delete the extra records?

Read the rest of this entry »