MySQL error code: 1175 during UPDATE in MySQL Workbench -


I'm trying to update this column visited , give it 1 value. I am writing a statement in MySQL workspace, and in SQL Editor from inside the workbook. I am writing the following command:

  UPDATE tablename SET column name = 1;   

This gives me the following error:

You are using Safe Update mode and you tried to update without a table that was Uses a key column, disable safe mode, toggle options ....

I have followed the instructions, and I have chosen the safe update option Delete from edit menu then Preferences then SQL Editor In and click. The same error still appears; I am not able to update this value. Please tell me what is wrong?

It seems that your MySQL session is set, this means that where you have a key in the block ( For example, you can not update or delete records without specifying the primary key ).

Try:

  SET SQL_SAFE_UPDATES = 0;   

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

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -