MySQL Forums
Forum List  »  Newbie

Re: SELECT DUPLICATE RECORDS
Posted by: Richard
Date: October 31, 2007 09:56AM

I think you need a subquery

SELECT t1.* FROM t1 INNER JOIN (
SELECT colA,colB,COUNT(*) FROM t1 GROUP BY colA,colB HAVING COUNT(*)>1) as t2
ON t1.cola = t2.cola and t1.colb = t2.colb;

Options: ReplyQuote


Subject
Written By
Posted
October 31, 2007 09:07AM
October 31, 2007 09:35AM
October 31, 2007 11:48AM
Re: SELECT DUPLICATE RECORDS
October 31, 2007 09:56AM
November 01, 2007 03:16AM
January 25, 2008 01:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.