Created
May 20, 2018 06:27
-
-
Save amr-swalha/159866493857729a90f0c0a8acc2d562 to your computer and use it in GitHub Desktop.
Script for Database for ASP.NET Core Course
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/****** Object: Table [dbo].[Customer] Script Date: 5/20/2018 10:26:06 AM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE TABLE [dbo].[Customer]( | |
[Id] [int] IDENTITY(1,1) NOT NULL, | |
[Name] [nvarchar](50) NULL, | |
[Email] [nvarchar](200) NULL, | |
[Phone] [nvarchar](200) NULL, | |
CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED | |
( | |
[Id] 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 | |
/****** Object: Table [dbo].[Items] Script Date: 5/20/2018 10:26:06 AM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE TABLE [dbo].[Items]( | |
[Id] [int] IDENTITY(1,1) NOT NULL, | |
[Name] [nvarchar](50) NULL, | |
[Price] [decimal](18, 2) NULL, | |
CONSTRAINT [PK_Items] PRIMARY KEY CLUSTERED | |
( | |
[Id] 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 | |
/****** Object: Table [dbo].[OrderItems] Script Date: 5/20/2018 10:26:06 AM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE TABLE [dbo].[OrderItems]( | |
[Id] [int] IDENTITY(1,1) NOT NULL, | |
[OrderId] [int] NOT NULL, | |
[ItemId] [int] NOT NULL, | |
[Qty] [int] NULL, | |
CONSTRAINT [PK_OrderItems] PRIMARY KEY CLUSTERED | |
( | |
[Id] 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 | |
/****** Object: Table [dbo].[Orders] Script Date: 5/20/2018 10:26:06 AM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE TABLE [dbo].[Orders]( | |
[Id] [int] IDENTITY(1,1) NOT NULL, | |
[OrderName] [nvarchar](50) NULL, | |
[CustomerId] [int] NULL, | |
CONSTRAINT [PK_Orders] PRIMARY KEY CLUSTERED | |
( | |
[Id] 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment