尝试使用mysql中的存储过程更新表时获取错误

时间:2022-09-20 23:21:51

UPDATE IDConfig SET FemaleID = FemaleID + 1;

UPDATE IDConfig SET FemaleID = FemaleID + 1;

Getting Error like You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Queries and reconnect.

获得错误就像您正在使用安全更新模式并且您尝试更新没有使用KEY列的WHERE的表要禁用安全模式,请在Preferences - > SQL Queries中切换选项并重新连接。

1 个解决方案

#1


0  

Your SQL tool uses this mechanism to tell you that you are about to update ALL records in a table. Normally you have a WHERE clause to limit the data that should be updated.

您的SQL工具使用此机制告诉您即将更新表中的所有记录。通常,您有一个WHERE子句来限制应更新的数据。

So to really update ALL records change that option in the configuration or use a WHERE clause to limit your data to update.

因此,要真正更新所有记录,请更改配置中的该选项,或使用WHERE子句限制数据更新。

You probably can trick your tool with this query

您可能会使用此查询欺骗您的工具

UPDATE IDConfig 
SET FemaleID = FemaleID + 1
WHERE 1 = 1

#1


0  

Your SQL tool uses this mechanism to tell you that you are about to update ALL records in a table. Normally you have a WHERE clause to limit the data that should be updated.

您的SQL工具使用此机制告诉您即将更新表中的所有记录。通常,您有一个WHERE子句来限制应更新的数据。

So to really update ALL records change that option in the configuration or use a WHERE clause to limit your data to update.

因此,要真正更新所有记录,请更改配置中的该选项,或使用WHERE子句限制数据更新。

You probably can trick your tool with this query

您可能会使用此查询欺骗您的工具

UPDATE IDConfig 
SET FemaleID = FemaleID + 1
WHERE 1 = 1