Greetings ...
I have two Tables in SQL Server, EMP and IDs.
EMP has general information like name, gender, phone, address, ... .
and IDs has Numbers of Identification cards and other information about them.
I have made One to One relationship between primary keys of the two tables.
The IDs table allows Insert command, but The EMP table DOES NOT.
and shows this message
"Insert statement conflicts with FK constraint" and states the names of the relation and the foreign keys.
Why is that happened ?? Thank u all
P.S:
1- The Primary keys for the two tables are the same name "ID"
2- The Relationship with "no action" relational integrity.
3- The Primary keys for the both of the tables are int auto increment
4- the EMP table has other 1 to 1 and 1 to M relationships with other tables