MySQL error code: 1175 during UPDATE in MySQL Workbench

前端 未结 20 1100
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 09:58

I\'m trying to update the column visited to give it the value 1. I use MySQL workbench, and I\'m writing the statement in the SQL editor from inside the workben

20条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 10:55

    It looks like your MySql session has the safe-updates option set. This means that you can't update or delete records without specifying a key (ex. primary key) in the where clause.

    Try:

    SET SQL_SAFE_UPDATES = 0;
    

    Or you can modify your query to follow the rule (use primary key in where clause).

提交回复
热议问题