초코레

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. 본문

에러 노트

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.

초코레 2020. 8. 21. 15:05
  • MySQL에서 where 절에서 pk가 아닌 다른 컬럼 값을 기준으로 update나 delete를 수행할 때 나타나는 오류
  • 이를 막지않도록 설정을 변경해주면 된다
  • 쿼리 구문에서 다음 문장을 실행한다
1
SET SQL_SAFE_UPDATES = 0;
cs

 

  • MySQL의 Workbench에서 메뉴 Edit > Preferences 를 실행 후, SQL Editor 탭에서 Safe Updates 항목의 체크를 해제한다