공부/MYSQL

[MYSQL] UPDATE,DELETE 1175 에러

cldy 2018. 8. 6. 18:06

<에러 : 1175>

MySQL  Workbench를 실행 하여 처음 UPDATE 또는 DELETE를 하였을 경우 이와 같은 에러를 볼 수 있다. 

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 Editor and reconnect.


<해결방법>

안전모드로 되어있어 safe mode를 꺼주면 된다.

SET SQL_SAFE_UPDATES = 0;

위의 코드를 실행 하면 잘 작동한다.