-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap-tables.sql
More file actions
45 lines (34 loc) · 1.97 KB
/
bootstrap-tables.sql
File metadata and controls
45 lines (34 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Create table Customer (
CustomerId int,
Name varchar(max),
Email varchar(max),
Status int,
StatusExpirationDate DateTime,
MoneySpent decimal,
);
Create table Movie (
MovieId int,
Name varchar(max),
LicensingModel int
);
Create table PurchasedMovie(
PurchasedMovieId int,
MovieId int,
CustomerId int,
Price decimal,
PurchaseDate DateTime,
ExpirationDate DateTime
);
insert into Movie ([MovieId],[Name] ,[LicensingModel]) values(1, 'Test1',1);
insert into Movie ([MovieId],[Name] ,[LicensingModel]) values(2, 'Test2',1);
insert into Movie ([MovieId],[Name] ,[LicensingModel]) values(3, 'Test3',1);
insert into Movie ([MovieId],[Name] ,[LicensingModel]) values(4, 'Test3',1);
insert into Customer ([CustomerId], [Name],[Email], [Status]) values(1, 'Test Customer1', 'a@a.com', 1)
insert into Customer ([CustomerId], [Name],[Email], [Status]) values(2, 'Test Customer2', 'b@a.com', 1)
insert into Customer ([CustomerId], [Name],[Email], [Status]) values(3, 'Test Customer3', 'c@a.com', 1)
insert into Customer ([CustomerId], [Name],[Email], [Status]) values(4, 'Test Customer4', 'd@a.com', 1)
insert into [dbo].[PurchasedMovie] ([PurchasedMovieId], [MovieId], [CustomerId], [Price], [PurchaseDate], [ExpirationDate]) values (1, 1, 1, 10, getdate(), GETDATE()+1);
insert into [dbo].[PurchasedMovie] ([PurchasedMovieId], [MovieId], [CustomerId], [Price], [PurchaseDate], [ExpirationDate]) values (2, 1, 2, 10, getdate(), GETDATE()+1);
insert into [dbo].[PurchasedMovie] ([PurchasedMovieId], [MovieId], [CustomerId], [Price], [PurchaseDate], [ExpirationDate]) values (3, 1, 3, 10, getdate(), GETDATE()+1);
insert into [dbo].[PurchasedMovie] ([PurchasedMovieId], [MovieId], [CustomerId], [Price], [PurchaseDate], [ExpirationDate]) values (4, 2, 1, 10, getdate(), GETDATE()+1);
insert into [dbo].[PurchasedMovie] ([PurchasedMovieId], [MovieId], [CustomerId], [Price], [PurchaseDate], [ExpirationDate]) values (5, 3, 1, 10, getdate(), GETDATE()+1);