gpt4 book ai didi

Mysql 更新抛出错误 1175

转载 作者:行者123 更新时间:2023-11-29 23:08:26 25 4
gpt4 key购买 nike

我想使用 MySQL 5.7 和 MySQL Workbench 6.2 在表中插入一些行。当我尝试时,出现错误 1175(在安全更新模式下不使用 WHERE 进行更新)

我的查询中有一个 WHERE 子句,它也在过滤表的 PK。

它看起来是这样的:

> update inventory as inv
>
> set inv.fk_location = null
> , inv.location_description = null
>
> -- only buffered rows
> where inv.id_inventory in (
> select tmp.id_inventory
> from tmp_inventory_location as tmp )

子选择给出了两行,其中有两个 inventory_id,它们也在我想要更新的表中。字段 id_inventory 也是设置 UN AI PK 的主键。据我谷歌搜索,一切都应该没问题。或者我错过了一件事?我真的不想更改该查询的安全更新模式。

谢谢菲利克斯

最佳答案

请按照以下步骤操作。这可能会有所帮助:

  1. 转到“编辑”,然后选择“偏好设置”
  2. 转至SQL 查询选项卡并取消选中安全更新,然后重新连接。

关于Mysql 更新抛出错误 1175,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28190359/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com