Tuesday, March 12, 2013

Error Code: 1175 You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

It is just a warning, can hinder you,, while executing a Function or Procedure.

Error Code: 1175
You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column


Problem:
It is because you tried to update/delete a table without a WHERE that uses a KEY column .

Solution:
the fix is to add SET SQL_SAFE_UPDATES=0; before your update query. Here’s the example:
SET SQL_SAFE_UPDATES=0;



OR


use below approach

Edit -> Preferences -> SQL Editor -> SQL Editor
remove Forbid UPDATE and DELETE statements without a WHERE clause (safe updates)



No comments:

Post a Comment

web stats