Home » Developer & Programmer » Forms » integrity constraint violations while inserting values
integrity constraint violations while inserting values [message #375426] Sat, 21 October 2000 14:44 Go to next message
Shirley
Messages: 8
Registered: August 2000
Junior Member
I successfully created a table. I am attempting to insert values and get the following error message:

INSERT INTO EMPLOYEE VALUES( *
ERROR at line 1:
ORA-02291: integrity constraint (SCOTT.SYS_C001296) violated - parent key not found

Do you know what may be the problem? Please help!!!
Re: integrity constraint violations while inserting values [message #375432 is a reply to message #375426] Mon, 23 October 2000 06:10 Go to previous message
Gs
Messages: 8
Registered: September 2000
Junior Member
Hi,
I guest the problem is b' cos of the Foreign key.
One of the column in table EMPLOYEE should be a foreign key to another table, and when we try to insert a value which not exist in the references table, Assume ...

We create following tables ...

EMPLOYEE table : empno, name, deptno ... etc
DEPT table : deptno, description ... etc

and the deptno in EMPLOYEE is FK for DEPT

------------------------------------------
From the above example, before we insert the
EMPLOYEE table for 'deptno' column, the
values must exist in 'deptno' in DEPT table.

Hope the above helps.
Previous Topic: Simple question on RECORD GROUP creation...
Next Topic: Query on date in Forms.
Goto Forum:
  


Current Time: Thu Aug 06 20:42:39 CDT 2020