1452
-
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" 값..