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
Post a Comment