if (not exists (select name from syscolumns where id = object_id('Pub_User') and name = 'Sex')) Begin ALTER TABLE Pub_User ADD Sex int EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'性别 type:checkbox enum:{男=0,女=1} default:0 tooltip:表示用户性别' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Pub_User', @level2type=N'COLUMN', @level2name=N'Sex' End if (not exists (select name from syscolumns where id = object_id('Pub_User') and name = 'Nation')) Begin ALTER TABLE Pub_User ADD Nation nvarchar(400) EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'民族 type:text' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Pub_User', @level2type=N'COLUMN', @level2name=N'Nation' End if (not exists (select name from syscolumns where id = object_id('Pub_User') and name = 'Political')) Begin ALTER TABLE Pub_User ADD Political int 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_User', @level2type=N'COLUMN', @level2name=N'Political' End if (not exists (select name from syscolumns where id = object_id('Pub_User') and name = 'Birthday')) Begin ALTER TABLE Pub_User ADD Birthday datetime EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'出生日期 type:text forbidpost:true' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Pub_User', @level2type=N'COLUMN', @level2name=N'Birthday' End