/****** Object: Table [dbo].[Manager_CheckSortB] Script Date: 2021/8/10 20:00:29 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Manager_CheckSortB]( [CheckSortId] [nvarchar](50) NOT NULL, [MonthReportId] [nvarchar](50) NULL, [CheckType] [nvarchar](30) NULL, [CheckNumber] [int] NULL, [TotalCheckNum] [int] NULL, [ViolationNumber] [int] NULL, [TotalViolationNum] [int] NULL, CONSTRAINT [PK_Manager_CheckSortB] PRIMARY KEY CLUSTERED ( [CheckSortId] 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].[Manager_CheckSortB] WITH CHECK ADD CONSTRAINT [FK_Manager_CheckSortB_Manager_MonthReport] FOREIGN KEY([MonthReportId]) REFERENCES [dbo].[Manager_MonthReportB] ([MonthReportId]) GO ALTER TABLE [dbo].[Manager_CheckSortB] CHECK CONSTRAINT [FK_Manager_CheckSortB_Manager_MonthReport] GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Manager_CheckSortB', @level2type=N'COLUMN',@level2name=N'CheckSortId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'月报告' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Manager_CheckSortB', @level2type=N'COLUMN',@level2name=N'MonthReportId' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'安全检查类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Manager_CheckSortB', @level2type=N'COLUMN',@level2name=N'CheckType' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'检查次数(当月)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Manager_CheckSortB', @level2type=N'COLUMN',@level2name=N'CheckNumber' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'总检查次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Manager_CheckSortB', @level2type=N'COLUMN',@level2name=N'TotalCheckNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'违章数量(当月)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Manager_CheckSortB', @level2type=N'COLUMN',@level2name=N'ViolationNumber' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'总违章数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Manager_CheckSortB', @level2type=N'COLUMN',@level2name=N'TotalViolationNum' GO EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'月报告HSE检查情况表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Manager_CheckSortB' GO