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