sql - MySQL DELETE FROM AS -
i trying delete kind of duplicates table can selected query:
select * `articles` t1 exists ( select `id` articles t2 t2.link = t1.link , t2.id > t1.id );
so tried 2 queries don't seem work:
delete `articles` t1 exists ( select `id` articles t2 t2.link = t1.link , t2.id > t1.id );
&
delete t1 using `articles` t1 exists ( select `id` `articles` t2 t2.link = t1.link , t2.id > t1.id );
both return syntax error.
you use multiple tables in from
clause:
delete t1 `articles` t1 , `articles` t2 t2.link = t1.link , t2.id > t1.id
Comments
Post a Comment