By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
3 rows affected
4 rows affected
Msg 547 Level 16 State 0 Line 1
The INSERT statement conflicted with the FOREIGN KEY constraint "My_FORIEGN_KEY". The conflict occurred in database "fiddle_e8ed92f3152e49d3b29370ac273a56fe", table "dbo.a", column 'aid'.
Msg 3621 Level 0 State 0 Line 1
The statement has been terminated.
aid | bid |
---|---|
1 | 11 |
1 | 12 |
2 | 21 |
3 | 31 |
2 rows affected
aid | bid |
---|---|
1 | 11 |
1 | 12 |
2 | 21 |
3 | 31 |
4 | 41 |
4 | 42 |
aid | bid |
---|---|
1 | 11 |
1 | 12 |
2 | 21 |
3 | 31 |
4 | 41 |
4 | 42 |
Msg 547 Level 16 State 0 Line 1
The INSERT statement conflicted with the FOREIGN KEY constraint "My_FORIEGN_KEY". The conflict occurred in database "fiddle_e8ed92f3152e49d3b29370ac273a56fe", table "dbo.a", column 'aid'.
Msg 3621 Level 0 State 0 Line 1
The statement has been terminated.
aid | bid |
---|---|
1 | 11 |
1 | 12 |
2 | 21 |
3 | 31 |
4 | 41 |
4 | 42 |
Msg 547 Level 16 State 0 Line 1
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "My_FORIEGN_KEY". The conflict occurred in database "fiddle_e8ed92f3152e49d3b29370ac273a56fe", table "dbo.a", column 'aid'.