Sql Server Database File Using Visual Studio 2015
Check out the beginners level tutorial video on, how to create Sql Server database file using Visual Studio 2015. This database file consists of two tables with a Primary Key, Foreign Key relationship between them.
Scripts to create the tables are given at the end of the post. Thank You.
You Tube
Vimeo
CREATE TABLE [dbo].[Department] ( [Id] INT IDENTITY (1, 1) NOT NULL, [Title] NVARCHAR (50) NOT NULL, PRIMARY KEY CLUSTERED ([Id] ASC) ); CREATE TABLE [dbo].[Employee] ( [Id] INT IDENTITY (1, 1) NOT NULL, [Name] VARCHAR (MAX) NOT NULL, [DeptId] INT NOT NULL, PRIMARY KEY CLUSTERED ([Id] ASC), CONSTRAINT [FK_Employee_Department] FOREIGN KEY ([DeptId]) REFERENCES [dbo].[Department] ([Id]) );