INSERT statement conflicted with the FOREIGN KEY constraint - SQL Server

前端 未结 14 1102
-上瘾入骨i
-上瘾入骨i 2020-11-22 11:09

I am getting the following error. Could you please help me?

Msg 547, Level 16, State 0, Line 1
The INSERT statement conflicted with the FOREIGN

14条回答
  •  盖世英雄少女心
    2020-11-22 11:59

    You'll need to post your statement for more clarification. But...

    That error means that the table you are inserting data into has a foreign key relationship with another table. Before data can be inserted, the value in the foreign key field must exist in the other table first.

提交回复
热议问题