This would give you a list of all users that have entered things more than
once; However, it would not give you all the rows that are duplicated.
SELECT Count(User) from mail_form2 GROUP BY User HAVING Count(User) > 1
Hope this helps!
Daniel Von Fange
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
2)
in a table i have a column called User. some people have entered things
into this table multiple times. how do i create a SELECT statement to
select
only those rows that have multiple Users? i need something like this
(but this
is wrong, of course):
SELECT * FROM mail_form2 WHERE 'count(User) >1'
SELECT * from mail_form2 GROUP BY User HAVING Count(User) > 1
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php