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 - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

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

java - Reading data from multiple zip files and combining them to one -