Feed on
Posts
Comments

To find the duplicate data in column category_name of table named Categories you can use this SQL Query:
 
SELECT * FROM Categories WHERE Categories.id NOT IN
(SELECT MIN(C.id) FROM Categories AS C
 WHERE Categories.category_name = C.category_name)

 
To delete the duplicate data you can use this SQL Query:

DELETE FROM Categories WHERE Categories.id NOT IN
(SELECT MIN(C.id) FROM Categories AS C
 WHERE Categories.category_name = C.category_name)

, ,
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • dzone
  • Netscape
  • digg
  • YahooMyWeb
  • Technorati

Trackback URI | Comments RSS

Leave a Reply

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a