Showing posts with label How to search duplicate records of any field mysql. Show all posts
Showing posts with label How to search duplicate records of any field mysql. Show all posts

Tuesday, 2 December 2014

Find Duplicate records based on any field mysql


Find Duplicate records based on any field mysql

The following will find all product_id that are used more than once. You only get a single record for each product_id.

SELECT product_id FROM oc_product_reward GROUP BY product_id HAVING count( product_id ) >1