开发者

MySQL DELETE query issue with Select

The following query:

DELETE FROM CO05IN.ININVPRC WHERE IPPART IN (SELECT IPPART FROM CO05IN.ININVPRC left join CO05IN.ININVMST on IPPART = IMP开发者_StackOverflow社区ART where IMPART is null);

Creates this on the log: You can't specify target table 'ININVPRC' for update in FROM clause.

What is causing this?

Note using MySQL version 5.1


Try in this way.

DELETE FROM CO05IN.ININVPRC WHERE IPPART IN (select * from (SELECT IPPART FROM CO05IN.ININVPRC left join CO05IN.ININVMST on IPPART = IMPART where IMPART is null) as t);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜