-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathDBCreationScript.txt
34 lines (29 loc) · 1006 Bytes
/
DBCreationScript.txt
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
USE [master]
GO
CREATE DATABASE [SpecificationPattern]
GO
USE [SpecificationPattern]
GO
CREATE TABLE [dbo].[Movie](
[MovieID] [bigint] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](50) NOT NULL,
[ReleaseDate] [datetime] NOT NULL,
[MpaaRating] [int] NOT NULL,
[Genre] [varchar](50) NOT NULL,
[Rating] [float] NOT NULL,
CONSTRAINT [PK_Movie] PRIMARY KEY CLUSTERED
(
[MovieID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
SET IDENTITY_INSERT [dbo].[Movie] ON
GO
INSERT [dbo].[Movie] ([MovieID], [Name], [ReleaseDate], [MpaaRating], [Genre], [Rating]) VALUES (1, N'Terminator Genisys', CAST(0x0000A4C800000000 AS DateTime), 2, N'Action', 7.6)
GO
INSERT [dbo].[Movie] ([MovieID], [Name], [ReleaseDate], [MpaaRating], [Genre], [Rating]) VALUES (2, N'Toy Story 3', CAST(0x00009D9900000000 AS DateTime), 1, N'Fantasy', 6.4)
GO
SET IDENTITY_INSERT [dbo].[Movie] OFF
GO