if (not exists (select name from syscolumns where id = object_id('Pub_Subject') and name = 'JoinType')) Begin ALTER TABLE Pub_Subject ADD JoinType int default(0) not null EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加入方式 type:checkbox enum:{通过申请加入=0,通过邀请加入=1,用户自由加入=2} default:0 tooltip:评课参赛者加入方式' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Pub_Subject', @level2type=N'COLUMN', @level2name=N'JoinType' End