0
WITH EmployeesCTE AS
(
   SELECT *, ROW_NUMBER() OVER (PARTITION BY ID ORDER BY ID) AS RowNumber
   FROM Employees
)
DELETE FROM EmployeesCTE WHERE RowNumber > 1;

Gives following Error:

Error Code: 1288. The target table EmployeesCTE of the DELETE is not updatable

What will be solution for above query in mysql

Barbaros Özhan
  • 47,993
  • 9
  • 26
  • 51
  • 1
    Indeed, there's such a sample [question](https://stackoverflow.com/questions/28432093/remove-duplicate-rows-based-on-one-column-value) which perhaps may help you – Barbaros Özhan May 18 '22 at 14:47

0 Answers0