How To Delete Duplicate Rows In Mysql

1 min read

A) Delete duplicate rows using DELETE JOIN statement

MySQL provides you with the DELETE JOIN statement that allows you to remove duplicate rows quickly.

The following statement deletes duplicate rows and keeps the highest id:

SELECT * FROM products mto WHERE EXISTS ( SELECT 1 FROM products mti WHERE mti.name = mto.name ORDER BY `mto`.`name` ASC LIMIT 1, 1 ) ORDER BY `thumbnail_img` ASC

 

Comments (0)

Leave a Comment

Type the above code here

Read Next

list of ngos in kenya 2019

82 min read

Kenya has a total of more than 2000 ngos . ngos are driven by people with a common interest. most ngos are organized around issues, such as human rights, environment and health.list of ngos in ke...

Continue reading

List Of Cabinet Secretaries In Kenya 2022 pdf

2 min read

List of cabinet secretaries in kenya 2022 - rutothe nominated cabinet secretaries are:-prime cabinet secretary - musalia mudavadics interior - professor kithure kindikitreasury - njuguna ndung'upublic...

Continue reading

Teachers Service Commission TSC Contacts and Offices In Kenya - Email , login , website and postal address

1 min read

Tsc contacts teachers service commission in kenya is located in tsc house on kilimanjaro avenue in upperhill in nairobi.tsc postal addressthe postal address of teachers service commission is priv...

Continue reading

Esmart College Kikuyu Town kuccps 2018 Intake: 2018/2019 September KUCCPS Admission letters,  Courses offered, Fees structure and Contacts

1 min read

  esmart college kikuyu town 2017/2018 september kuccps admission letter   instructions to download kuccps admission letter online download and read the stude...

Continue reading

KENYA MEDICAL TRAINING COLLEGE campuses in kenya 2017 intake

3 min read

He national distribution of the kmtc campuses in the country amplifies the government's determination to take health services closer to kenyans.the unique location of the colleges in urban and rural s...

Continue reading

TSC Contacts : TSC County Directors in Each County & Their official Contacts

3 min read

Tsc head office contactse-mail: info@tsc.go.kephone: 020 289 200contacts of tsc county directors in all 47 counties1. tsc county director nairobip.o box 49416-00100 nairobi gpo cdirnairobi@tsc.go...

Continue reading