개발/Oracle SQL
UPDATE 쿼리문 실행시 ERROR CODE 1175
워너-비
2017. 11. 28. 10:28
UPDATE 쿼리문 실행시 ERROR CODE 1175 발생
에러 메시지
Mysql Workbench에서 UPDATE 문을 작성하던 중 다음과 같은 에러가 발생했다.
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 Update mode 상태이기 때문에 UPDATE시 KEY 컬럼을 이용하지 않을 경우 업데이트할 수 없다.
해결방법
방법 1.
다음과 같은 쿼리문으로 Safe Update Mode를 해제하여 해결이 가능하다.
SET SQL_SAFE_UPDATES=0; |
방법 2.
Workbench에서 설정에서 Safe모드 체크를 해제해도 된다.
[Edit] - [Preferences...] - [SQL Queries] - "Safe Updates". Forbid UPDATEs and DELETEs with no key in WHERE .... 체크 해제