init
This commit is contained in:
28
DataPRO_sql/dbo.ChannelCodes.Table.sql
Normal file
28
DataPRO_sql/dbo.ChannelCodes.Table.sql
Normal file
@@ -0,0 +1,28 @@
|
||||
USE [DataPRO]
|
||||
GO
|
||||
|
||||
/****** Object: Table [dbo].[ChannelCodes] Script Date: 3/29/2019 9:29:06 AM ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
CREATE TABLE [dbo].[ChannelCodes](
|
||||
[Id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[Code] [nvarchar](255) NOT NULL,
|
||||
[Name] [nvarchar](255) NOT NULL,
|
||||
[CodeType] [tinyint] NOT NULL,
|
||||
CONSTRAINT [PK_ChannelCodes] 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
|
||||
|
||||
ALTER TABLE [dbo].[ChannelCodes] WITH NOCHECK ADD CONSTRAINT [FK_ChannelCodes_CodeType] FOREIGN KEY([CodeType])
|
||||
REFERENCES [dbo].[ChannelCodeType] ([Id])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[ChannelCodes] CHECK CONSTRAINT [FK_ChannelCodes_CodeType]
|
||||
GO
|
||||
Reference in New Issue
Block a user