1
기존 찾을 수 없습니다 그러나, 내가 operation_history 테이블에 삽입 할 때, task_history 행이 내가 준 id와 함께 존재하지 않는다는 오류가 발생합니다. 다음은 쿼리를 삽입하는 것입니다PostgreSQL의 외래 키 제약 내가이 테이블이 키
INSERT INTO operation_history (task_history, operation) VALUES
(1, 2);
을 그리고 여기에 오류가 : 나는 IDS 1, 2와 task_history 테이블에 세 개의 행이 있다는 것을,하지만 확실히 알
ERROR: insert or update on table "operation_history" violates foreign key constraint "operation_history_task_history"
DETAIL: Key (task_history)=(1) is not present in table "task_history".
하고, 3.
무엇이 원인이 될 수 있으며 어떻게 해결할 수 있습니까?
매우 불가능합니다.이 피들을 참조하십시오. http://sqlfiddle.com/#!15/999e7/1 – Rahul