I want to delete duplicated rows from my link table. This select query here does work:
SELECT *
from LINKS t1
WHERE EXISTS (
SELECT *
from LINKS t2
where t2.cntid = t1.cntid
and t2.title= t1.title
and t2.lnkid > t1.lnkid
);
when I change the same query to delete:
DELETE from LINKS t1
WHERE EXISTS (
SELECT *
from LINKS t2
where t2.cntid = t1.cntid
and t2.title= t1.title
and t2.lnkid > t1.lnkid
);
it does not work anymore and states: ERROR 1064 (42000): You have an error in your SQL syntax
What is the issue here? Can someone please help to fix the query?