I have been trying to execute the below query in Mysql 5.7.
DELETE FROM tablename1 T1
WHERE EXISTS (
SELECT *
FROM tablename1 T2
WHERE T2.code = T1.code
AND T2.dname = T2.dname
AND T2.created_date > T1.created_date
);
But it throws me an error : Reason: liquibase.exception.DatabaseException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'T1
This query works fine in Oracle but for some reason 'alias' doesnt work in MySQL 5.7 Is there anyway I can fix this issue within this Mysql 5.7 version.
Thanks in advance.