Table is specified twice, both as a target for 'UPDATE' and as a separate source
Posted hankyoon
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Table is specified twice, both as a target for 'UPDATE' and as a separate source相关的知识,希望对你有一定的参考价值。
UPDATE Bins b SET b.ShopSn =’111201611111168706’ WHERE b.Id IN (SELECT b.Id FROM Bins b JOIN BinInventory bi ON bi.BinId = b.Id WHERE bi.Quantity >0 AND b.IsEnable=1 AND bi.IsEnable =1);
UPDATE Bins b SET b.ShopSn =’111201611111168706’ WHERE b.Id IN (select * from (SELECT b.Id FROM Bins b JOIN BinInventory bi ON bi.BinId = b.Id WHERE bi.Quantity >0 AND b.IsEnable=1 AND bi.IsEnable =1) as Y);
测试delete也存在这种情况
以上是关于Table is specified twice, both as a target for 'UPDATE' and as a separate source的主要内容,如果未能解决你的问题,请参考以下文章
InvalidRequestError: Table is already defined for this MetaData instance. Specify 'extend_exist
如何解决使用mybatis-plus提供的多租户插件出现Column ‘tenant_id‘ specified twice问题
Tensorflow 错误:The flag 'xxx' is defined twice
No orientation specified, and the default is