时间:2021-07-01 10:21:17 帮助过:34人阅读
mysql 版本 5.7.9
原来的代码进行的操作
UPDATE message_list SET Status
= 1 WHERE RecID IN (SELECT RecID FROM message_list );
根据网上 添加一个中间表后 还是不能进行update 操作
PDATE message_list SET Status
= 1 WHERE RecID IN (SELECT a.RecID FROM (SELECT c.* FROM message_list c) a);
下面是错误信息
mysql> UPDATE message_list SET Status
= 1 WHERE RecID IN (SELECT a.RecID FROM (SELECT c.* FROM message_list c) a);
1093 - You can't specify target table 'message_list' for update in FROM clause
mysql>