add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
(No column name)
Microsoft SQL Server 2022 (RTM) - 16.0.1000.6 (X64)
Oct 8 2022 05:58:25
Copyright (C) 2022 Microsoft Corporation
Express Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)
5 rows affected
1 rows affected
userId forename surname email country isPremium premiumStart premiumEnd
1 karen rutherford karen.rutherford90@hotmail.com USA False null null
2 casper goodwin casper.goodwin81@gmail.com UK False null null
3 mariam jones mariam14@yahoo.com USA True null null
4 eden breitenberg eden_breitenberg@hotmail.com IRE False null null
5 malachi morris malachi85@yahoo.com BEL False null null
5 rows affected
productId description color cost
1 Scooter Red 3.9900
2 Bike Blue 19.9900
3 Boat Yellow 4.9900
4 Car Green 7.9900
5 Tank Brown 2.0000
4 rows affected
basketID userID createDate
1 1 2023-11-07 05:08:12.680
2 2 2023-11-07 05:08:12.680
3 3 2023-11-07 05:08:12.680
4 5 2023-11-07 05:08:12.680
Msg 547 Level 16 State 0 Line 3
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_BasketProducts_basketID". The conflict occurred in database "fiddle_5ae6dbb3ca6e48e883859fc38d5c81ba", table "dbo.Basket", column 'basketID'.
Msg 3621 Level 0 State 0 Line 3
The statement has been terminated.
Msg 547 Level 16 State 0 Line 3
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_BasketProduct_ProductID". The conflict occurred in database "fiddle_5ae6dbb3ca6e48e883859fc38d5c81ba", table "dbo.Product", column 'productId'.
Msg 3621 Level 0 State 0 Line 3
The statement has been terminated.
6 rows affected
basketID ProductID
1 2
1 5
2 1
2 4
2 5
3 1
basketID userID createDate basketID ProductID userId forename surname email country isPremium premiumStart premiumEnd productId description color cost
1 1 2023-11-07 05:08:12.680 1 2 1 karen rutherford karen.rutherford90@hotmail.com USA False null null 2 Bike Blue 19.9900
1 1 2023-11-07 05:08:12.680 1 5 1 karen rutherford karen.rutherford90@hotmail.com USA False null null 5 Tank Brown 2.0000
2 2 2023-11-07 05:08:12.680 2 1 2 casper goodwin casper.goodwin81@gmail.com UK False null null 1 Scooter Red 3.9900
2 2 2023-11-07 05:08:12.680 2 4 2 casper goodwin casper.goodwin81@gmail.com UK False null null 4 Car Green 7.9900
2 2 2023-11-07 05:08:12.680 2 5 2 casper goodwin casper.goodwin81@gmail.com UK False null null 5 Tank Brown 2.0000
3 3 2023-11-07 05:08:12.680 3 1 3 mariam jones mariam14@yahoo.com USA True null null 1 Scooter Red 3.9900
basketID userID createDate userId forename surname email country isPremium premiumStart premiumEnd basketID ProductID productId description color cost
1 1 2023-11-07 05:08:12.680 1 karen rutherford karen.rutherford90@hotmail.com USA False null null 1 2 2 Bike Blue 19.9900
1 1 2023-11-07 05:08:12.680 1 karen rutherford karen.rutherford90@hotmail.com USA False null null 1 5 5 Tank Brown 2.0000
2 2 2023-11-07 05:08:12.680 2 casper goodwin casper.goodwin81@gmail.com UK False null null 2 1 1 Scooter Red 3.9900
2 2 2023-11-07 05:08:12.680 2 casper goodwin casper.goodwin81@gmail.com UK False null null 2 4 4 Car Green 7.9900
2 2 2023-11-07 05:08:12.680 2 casper goodwin casper.goodwin81@gmail.com UK False null null 2 5 5 Tank Brown 2.0000
3 3 2023-11-07 05:08:12.680 3 mariam jones mariam14@yahoo.com USA True null null 3 1 1 Scooter Red 3.9900
4 5 2023-11-07 05:08:12.680 5 malachi morris malachi85@yahoo.com BEL False null null null null null null null null
forename surname isPremium
karen rutherford Standard member
casper goodwin Standard member
mariam jones Premium Member
eden breitenberg Standard member
malachi morris Standard member