Error 360: Cannot modify table or view used in subquery

杀马特。学长 韩版系。学妹 提交于 2019-12-01 22:52:28

You're trying to UPDATE the table transaction and read from the same table using SELECT MAX with the same query. You cannot do that.

Subquery restrictions

In general, you cannot modify a table and select from the same table in a subquery. For example, this limitation applies to statements of the following forms:
DELETE FROM t WHERE ... (SELECT ... FROM t ...);
UPDATE t ... WHERE col = (SELECT ... FROM t ...);
{INSERT|REPLACE} INTO t (SELECT ... FROM t ...);

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!