By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
7 rows affected
Msg 547 Level 16 State 0 Line 2
The INSERT statement conflicted with the FOREIGN KEY constraint "FK__Test2__1273C1CD". The conflict occurred in database "fiddle_70fd0125e1704679b1626b8dadfca216", table "dbo.Test".
Msg 547 Level 16 State 0 Line 3
The INSERT statement conflicted with the FOREIGN KEY constraint "FK__Test3__15502E78". The conflict occurred in database "fiddle_70fd0125e1704679b1626b8dadfca216", table "dbo.Test".
Msg 3621 Level 0 State 0 Line 2
The statement has been terminated.
Msg 3621 Level 0 State 0 Line 3
The statement has been terminated.
Id1 | Id2 |
---|---|
1 | 1 |
TestId1 | TestId2 |
---|---|
1 | null |
1 | 1 |
2 | null |
TestId1 | TestId2Calc | TestId2 |
---|---|---|
1 | -1 | null |
1 | 1 | 1 |
2 | -1 | null |