I want to delete duplicate rows from this MySQL table without creating a temp table. I tried to do it "WITH CTE" but that doesn't work as I am using MySQL-Workbench.
I tried to achieve the result using this query but it's not working.
DELETE FROM employee WHERE
(SELECT * FROM
(SELECT row_number() OVER (partition by id) rn FROM employee)
alias) > 1;
I want to delete all duplicate rows but keep one.