MySQL - DELETE FROM with subquery -


im trying execute query i'm getting error #1064.

delete tableabc id in (select id `tablexyz` `qty` = 0); 

but following statement works

select * tableabc id in (select id tablexyz qty = 0);

here answer:

to use delete query subquery has condition, following:

delete `tableabc` join (select id `tablexyz` `qty`=0) b on b.id = a.id 

Comments

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -