Skip to content

Matt Beckman

  • #171 (no title)

Tag: query

Delete Duplicate Rows/Records in MySQL Table

Posted on March 22, 2010 by matt

Most articles on removing duplicate rows from a MySQL table involve 3 steps, but the following query is what I use for purging dupe records in one simple query. DELETE FROM `myTable` WHERE id NOT IN (SELECT t1.id FROM (SELECT id, groupByColumn FROM `myTable` ORDER BY id DESC) as t1 GROUP BY t1.groupByColumn) – “myTable” […]

Posted in Database Servers, General, MySQLTagged MySQL, query 3 Comments

Tags for Ye Olde Blog

11 12 13 14 apt-get asp.net aws backup camera canon5d Cloud Hosting cluster Debian dist-upgrade dreamhost Etch gallery haproxy hd heartbeat highdef hosting infinovision jets3t joomla jvideo Linux load balancer MySQL performance Photography photos PHP projects reorganize review s3 Sarge scaling sites squid Upgrade video Windows XenServer

Ye Olde Blog Archive

  • February 2011
  • April 2010
  • March 2010
  • September 2009
  • July 2009
  • June 2009
  • March 2009
  • February 2009
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • February 2008
  • January 2008
  • September 2007
  • August 2007
Proudly powered by WordPress | Theme: sosimple by Fernando Villamor Jr..