delete specific column duplicate data in mysql
I have a mysql table site_visitor with vid(auto_increment),IP,page,visit_time… columns, the problem is many duplicate IP data in the table, only the IP column data is duplicated while the others like isp,visit_time… are not, i did much test and finally find a very simple way.
delete specific column duplicate data in mysql
DELETE duplicate_rows.* FROM site_visitor AS single_rows INNER JOIN site_visitor AS duplicate_rows ON duplicate_rows.IP= single_rows.IP AND duplicate_rows.vid> single_rows.vid;
just run those mysql codes via phpmyadmin or via php query, you will see it’s a magic.
, I'm a freelancer and available now,if need help just contact me without hesitation.
4 Responses to “delete specific column duplicate data in mysql”
Leave a Reply
-
Search for:
Categories
- apache (2)
- css xhtml (10)
- html5 (1)
- javascript (3)
- jquery (5)
- magento (3)
- mysql (1)
- php (1)
- SEO Friendly (6)
- Tools (3)
- w3c validation (4)
- Wordpress (4)


















found your site on del.icio.us today and really liked it.. i bookmarked it and will be back to check it out some more later
hey,this is Rhett Ohs,just discovered your web-site on google and i must say this blog is great.may I quote some of the information found in this web site to my local students?i am not sure and what you think?in any case,Many thanks!
Nice brief and this fill someone in on helped me alot in my college assignement. Thank you seeking your information.
I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for all of your time & work.