USE DaniloPizza
GO
IF EXISTS (SELECT name
FROM sysobjects
WHERE name = N'CustomerOrder'
AND type = 'U')
DROP TABLE CustomerOrder
GO
create table CustomerOrder (
CustomerOrderID int IDENTITY(1, 1) PRIMARY KEY NOT NULL,
PizzaSize smallint Default 2 NOT NULL,
PriceSmall Decimal(4,2) Default 8.95,
PriceMedium Decimal(4,2) Default 10.75,
PriceLarge Decimal(4,2) Default 12.55,
Pepperoni Bit,
Sausage Bit,
ExtraCheese Bit,
Onions Bit,
Olives Bit
)
GO
INSERT INTO CustomerOrder (PizzaSize, PriceSmall, PriceMedium, PriceLarge, Pepperoni, Sausage, ExtraCheese, Onions, Olives)
VALUES (2, 8.95, 9.55, 12.55, 1, 1, 0, 0, 0);
INSERT INTO CustomerOrder (PizzaSize, PriceSmall, PriceMedium, PriceLarge, Pepperoni, Sausage, ExtraCheese, Onions, Olives)
VALUES (1, 6.75, 8.95, 12.55, 1, 0, 1, 0, 0);
INSERT INTO CustomerOrder (PizzaSize, PriceSmall, PriceMedium, PriceLarge, Pepperoni, Sausage, ExtraCheese, Onions, Olives)
VALUES (3, 8.95, 9.55, 11.25, 0, 1, 0, 0, 1);
INSERT INTO CustomerOrder (PizzaSize, PriceSmall, PriceMedium, PriceLarge, Pepperoni, Sausage, ExtraCheese, Onions, Olives)
VALUES (2, 8.95, 8.55, 12.55, 0, 0, 1, 1, 0);
|