SELECT col1
FROM table1
GROUP by col1
HAVING count(col1) >  1

-ms


-----Original Message-----
From: Bob Sawyer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2003 12:04 PM
To: MySQL List
Subject: Opposite of DISTINCT()

I know that using SELECT DISTINCT(colname) will result in output that does
not contain any duplicates from that column. But how would I output JUST the
duplicates? If I have as part of a table a column containing email
addresses, and I want to list just the duplicate addresses rather than the
distinct addresses, what's the syntax there?

Thanks,
Bob



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to