Helpfulbox Now Offers Free POS Software for restaurants, kiosk, and any other retails business completely free used windows cashier system or as full blown POS. You will able to print to kitchen, display orders on the kitchen screen, manage inventory, employee, report, customer loyalty offers, employee management, delivery address track and much more, al for free.

How to select duplicate data rows in mysql or in sql

By: Guest
Date: Sat-May-2-2009-
Response
2
SELECT DISTINCT(emailAddress) AS user, COUNT(emailAddress) AS userCount FROM table GROUP BY emailAddress HAVING userCount > 1

This would show up any email addresses that exist twice or more in your current database of subscribers...(although this is un-tested code)

[d] By: Guest
Date: Sat-May-2-2009
Response
2
SELECT DISTINCT(emailAddress) AS user, COUNT(emailAddress) AS userCount FROM table GROUP BY emailAddress HAVING userCount > 1

The code above help to determine the duplicate entries.

However, is there any SQL command i can remove the duplicate entries on the fly?

I was thinking to get the ID, and PHP to DELETE the duplicate entries.

What is the best way?

1. Should i use PHP to remove duplicate entry?

2. OR should i come out a SQL command to do that. Please advise.

[d] By: Guest
Date: Sat-May-2-2009
Response
What is 1 + 100



Helpfulbox Now Offers Free POS Software

for restaurants, kiosk, and any other retails business completely free. It can be used as windows cashier system or as full blown POS. You will able to print to kitchen, display orders on the kitchen screen, manage inventory, employee, report, customer loyalty offers, employee management, delivery address track and much more, all for free.

Just Updated::