Hello..
      In sqlite (version 3.7.7.1),  I created two tables with foreign keys
as shown below

CREATE TABLE [*Employee*] (
  [*EmpId*] INT NOT NULL,
  [EmpName] VARCHAR2(50));

CREATE TABLE [*Department*] (
  [DeptID] INTEGER NOT NULL,
  [DeptName] VARCHAR2(20),
  [*EmpID*] INTEGER NOT NULL CONSTRAINT [FK_EMP_Dept] REFERENCES
[Employee]([*EmpId*]));

Using sqlite Expert Tool,
I inserted a row in *Employee* Table - Success
when i want to delete the same row from Employee table - gives error
"foreign key mismatch".

When i try to insert a row in *Department* Table, gives error "foreign key
mismatch".

I tried executing PRAGMA foreign_keys = ON
and it returns "1"

But still i am getting errors. Pls assist me to fix this issue.
Thanks in advance.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to