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

Popular posts from this blog

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -

node.js - On Gitbash - Bower : ENOGIT git is not installed or not in the PATH -