[Solved] MySQL Error: You can't specify target table for update in FROM clause

Last Reply one month ago By Mudassar

Posted one month ago

Hi!

I want delete duplicate rows in MySql, but its show error. 

delete from mdl_grade_grades WHERE 
itemid in (SELECT itemid FROM mdl_grade_grades 
GROUP by itemid HAVING COUNT(*) > 1) 
AND finalgrade = ''

Error Code: 1093. You can't specify target table 'mdl_grade_grades' for update in FROM clause 0,000 sec

Posted one month ago