-- Upewnianie się, że używana jest baza Publisher
Use Publisher
Go
-- Tworzenie nowego schematu Sales
Create Schema Sales
Go
-- Tworzenie tabeli Cars
CREATE TABLE Sales.Cars
(ProdID INT PRIMARY KEY,
ProdDesc varchar(35),
Country varchar(7),
LastUpdate smalldatetime
)
Go
-- Wstawianie wierszy do tabeli Cars
insert Sales.Cars (prodid, proddesc, country, lastupdate)
values (1, 'ProEfficient Sedan', 'USA', getdate())
insert Sales.Cars (prodid, proddesc, country, lastupdate)
values (2, 'ProEfficient Van', 'USA', getdate())
insert Sales.Cars (prodid, proddesc, country, lastupdate)
values (3, 'JieNeng Crossover', 'Chiny', getdate())
insert Sales.Cars (prodid, proddesc, country, lastupdate)
values (4, 'Jieneng Utility', 'Chiny', getdate())
insert Sales.Cars (prodid, proddesc, country, lastupdate)
values (5, 'EuroEfficient Wagon', 'Szwecja', getdate())
insert Sales.Cars (prodid, proddesc, country, lastupdate)
values (6, 'EuroEfficient Pickup', 'Szwecja', getdate())