error
-
[MySQL Workbench]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언어/mysql 2024. 5. 31. 13:24
workbench 에서 다음과 같이 오류가 난다면, 그 이유는 데이터베이스에서 실수로 전체 테이블을 업데이트하거나 삭제하는 것을 방지하기 위해 설계되었습니다. 이 모드가 활성화되어 있으면 WHERE 절에 KEY 컬럼을 사용하지 않고 테이블을 업데이트하거나 삭제할 수 없습니다.1. Safe Update Mode 비활성화Safe Update Mode를 비활성화하려면 다음 단계를 따르세요:MySQL Workbench를 열고 상단 메뉴에서 Edit를 선택합니다.Preferences를 선택합니다.왼쪽 메뉴에서 SQL Editor를 선택합니다.Safe Updates (requiring WHERE clause or LIMIT to UPDATE or DELETE)를 체크 해제합니다.Apply 버튼을 클릭합니다.데이터베..
-
mysql error 1452 (42000)언어/mysql 2024. 5. 8. 14:59
MariaDB [Board]> INSERT INTO posts (title, content, user_id) VALUES ('title3', 'content3', );ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1 이 오류는 "posts" 테이블의 "id" 열에 외래 키 제약이 설정되어 있고, 해당 열이 "users" 테이블의 "id" 열을 참조하고 있기 때문에 발생합니다. 즉, "posts" 테이블에 삽입된 데이터는 "users" 테이블의 "id" 값..