how to find duplicated field values and delete them in mysql

Posted by Mac Taylor on Stack Overflow See other posts from Stack Overflow or by Mac Taylor
Published on 2010-04-26T22:23:41Z Indexed on 2010/04/26 22:33 UTC
Read the original article Hit count: 212

Filed under:
|

Consider we have a field named (username) in our table named (tpl_users), now this table has lots of duplicated rows

I wrote this code to delete duplicated usernames:

Delete FROM tpl_users WHERE username = username;

How is it possible to delete duplicated usernames?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about php