Tuesday, April 26, 2016

YOU ARE USING SAFE UPDATE MODE AND YOU TRIED TO UPDATE A TABLE WITHOUT A WHERE THAT USES A KEY COLUMN

ERROR CODE 1175. TO DISABLE SAFE MODE, TOGGLE THE OPTIONS IN PREFERENCES --> SQL EDITOR --> QUERY EDITOR --> RECONNECT

You are Using SAFE UPDATE MODE AND YOU TRIED TO UPDATE A TABLE WITHOUT A WHERE THAT USES A KEY COLUMN

One of my LinkedIn friend got above error while truncating table in MY-SQL, so i suggested er very simplest solution as below,

Ans -

A. What is the problem / statement meaning -
It means my sql is working on safe mode, and it does not allow any updation (truncate/delete/update) when it is in safe mode.








B. Solution - 

We just need to disable safe mode.

So to disable safe mode, we need to write below query above your update query.

For ex: 

SET SQL_SAFE_UPDATES = 0;   --  it means disable safe mode for updates in my sql.

Truncate table tableName ;




1 comment: