By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
6 rows affected
id | order_id |
---|---|
1 | 10 |
2 | 10 |
3 | null |
id | activeCupon_id |
---|---|
10 | 1 |
20 | null |
30 | null |
Msg 547 Level 16 State 0 Line 2
The UPDATE statement conflicted with the FOREIGN KEY constraint "FK__orders__398D8EEE". The conflict occurred in database "fiddle_8fcb905e85fd4376a2e6e2c3ac6526ae", table "dbo.gift_cupons".
Msg 3621 Level 0 State 0 Line 2
The statement has been terminated.
Msg 547 Level 16 State 0 Line 2
The UPDATE statement conflicted with the REFERENCE constraint "FK__orders__398D8EEE". The conflict occurred in database "fiddle_8fcb905e85fd4376a2e6e2c3ac6526ae", table "dbo.orders".
Msg 3621 Level 0 State 0 Line 2
The statement has been terminated.