【问题标题】:How can I got clear the error while running UPDATE query in MySQL? [duplicate]在 MySQL 中运行 UPDATE 查询时如何清除错误? [复制]
【发布时间】:2014-09-10 14:27:46
【问题描述】:

我正在使用 MySQL WORKBENCH 6.1.6。我需要更新我的 database_table。我尝试了以下编码:

UPDATE `test`.`festexplorer_users`
SET
User_preference = 'All_Over_India' 
WHERE User_year_of_passing=2015;

这里,“test”是我的数据库名称,festexplorer_users 是我的表名,我需要更新 User_preference 列。我收到以下错误。

Error Code: 1175. 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.

如何清除我的错误?

【问题讨论】:

标签: mysql sql


【解决方案1】:

在您的 MySQL WorkBench 中转到

  • 编辑 -> 首选项 -> SQL 查询

    取消选中禁止更新和删除
    没有 WHERE 子句的语句(安全更新)

然后

  • 查询 --> 重新连接到服务器

【讨论】:

    猜你喜欢
    • 2014-11-18
    • 1970-01-01
    • 2015-09-01
    • 2012-02-21
    • 1970-01-01
    • 1970-01-01
    • 2016-11-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多