insert null in columm which have FOREIGN KEY constraint
I have a 2 table. table structure is like this:
table A
(pkidA, name,address)
table B
(pkidB, fkA, year)
in table A pkidA is a primary key
in table B pkidB is a primary key. and fkA is a foreign key with pkidA of table A.
in table B value of fkA is can be null.
i created cmp for table A and table B.
i want to insert one row in table B like (112,,2005) means i want to add fkA null value.
when i create a row it gives this error:
java.sql.SQLException: INSERT statement conflicted with COLUMN FOREIGN KEY constraint
thanks in advance