if (not exists (select name from syscolumns where id = object_id('Cmp_UserShare') and name = 'Version')) Begin ALTER TABLE Cmp_UserShare ADD Version int not null EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'版本号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Cmp_UserShare', @level2type=N'COLUMN', @level2name=N'Version' End if (not exists (select name from syscolumns where id = object_id('Cmp_UserShare') and name = 'DomainName')) Begin ALTER TABLE Cmp_UserShare ADD DomainName nvarchar(64) EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网站名称 type:text ' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Cmp_UserShare', @level2type=N'COLUMN', @level2name=N'DomainName' End if (not exists (select name from syscolumns where id = object_id('Cmp_UserShare') and name = 'Category')) Begin ALTER TABLE Cmp_UserShare ADD Category nvarchar(64) EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属类型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Cmp_UserShare', @level2type=N'COLUMN', @level2name=N'Category' End if (not exists (select name from syscolumns where id = object_id('Cmp_UserShare') and name = 'Grade')) Begin ALTER TABLE Cmp_UserShare ADD Grade nvarchar(64) EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属年级' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Cmp_UserShare', @level2type=N'COLUMN', @level2name=N'Grade' End