CREATE TABLE [dbo].[Dim_Tyc_Supplier_Main_Staff_Info](
[StaffId] [nvarchar](255) NOT NULL,
[SupplierCode] [nvarchar](255) NULL,
[Position1] [nvarchar](255) NULL,
[Position2] [nvarchar](255) NULL,
[Position3] [nvarchar](255) NULL,
[MainStaffName] [nvarchar](255) NULL,
[MainStaffId] [nvarchar](255) NULL,
[Logo] [nvarchar](255) NULL,
[Type] [nvarchar](255) NULL,
[IsAllcompanySync] [nvarchar](255) NULL,
[ODS_InsertTime] [datetime] NULL,
[ODS_UpdateTime] [datetime] NULL,
[JobName] [nvarchar](255) NULL,
CONSTRAINT [PK_Dim_Tyc_Supplier_Main_Staff_Info] PRIMARY KEY CLUSTERED
(
[StaffId] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人员ID(Ods_tyc_Staff.Id)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'StaffId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商Code(ODS_Tyc_BaseInfo.SupplierCode)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'SupplierCode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职位1(ODS_Tyc_Staff.TypeJoin)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'Position1'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职位2(ODS_Tyc_Staff.TypeJoin)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'Position2'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职位3(ODS_Tyc_Staff.TypeJoin)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'Position3'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主要人员名(ODS_Tyc_Staff.Name)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'MainStaffName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'人员ID(ODS_Tyc_Staff.Hcgid)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'MainStaffId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'logo(ODS_Tyc_Staff.logo)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'Logo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'2-人(ODS_Tyc_Staff.Type)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'Type'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否同步完主要人员所有公司[0:未完成,1:已完成,2:失败]' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'IsAllcompanySync'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'ODS_InsertTime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'ODS_UpdateTime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'作业名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info', @level2type=N'COLUMN',@level2name=N'JobName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'供应商主要人员信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dim_Tyc_Supplier_Main_Staff_Info'
GO
标签:语句,Dim,建表,SQLserver,Tyc,Info,Supplier,Main,Staff From: https://www.cnblogs.com/1241187306qq/p/16889347.html