mysql Error1093错误


官方说明: Error: 1093 SQLSTATE: HY000 (ER_UPDATE_TABLE_USED)Message: You can’t specify target table ‘%s’ for update in FROM clauseThis error occurs for attempts to select from and modify the same table within a single statement. If the select attempt occurs within a derived table, you can avoid this error by setting the derived_merge flag of the optimizer_switch system开发云主机域名 variable to force the subquery to be materialized into a temporary table, which effectively causes it to be a different table from the one modified. See Section 9.2.2.3, “Optimizing Derived Tables and View References”.
mysql不支持,在一条语句对同一个表,先查询再更新的操作。解决方法1:改成sql比如:利用临时表解决方法2:官方说:可以通过设置optimizer_switch的 derived_merge参数来解决。 备注:Oracle是不会这个问题的

相关推荐: 复制信息记录表|全方位认识 mysql 系统库

在上一期《时区信息记录表|全方位认识 mysql 系统库》中,我们详细介绍了mysql系统库中的时区信息记录表,本期我们将为大家带来系列第七篇《复制信息记录表|全方位认识 mysql 系统库》,下面请跟随我们一起开始 mysql 系统库的系统学习之旅吧! 1、…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

(0)
打赏 微信扫一扫 微信扫一扫
上一篇 06/08 11:55
下一篇 06/08 11:55

相关推荐