2

I am using MySQL WORKBENCH 6.1.6. I need to update my database_table. I have tried the following coding:

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

Here, "test" is my database name, festexplorer_users is my table name and I need to update the column User_preference. I have got the following error.

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.

How could I clear my error?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
kalyan
  • 37
  • 1
  • 6

1 Answers1

0

In your MySQL WorkBench go to

  • Edit -> Preferences -> SQL Queries

    Uncheck Forbid UPDATE and DELETE
    statements without a WHERE clause (safe updates)

then

  • Query --> Reconnect to Server
bumbumpaw
  • 2,522
  • 1
  • 24
  • 54