if (not exists (select name from syscolumns where id = object_id('Pub_AgentServer') and name = 'FactoryType')) Begin ALTER TABLE Pub_AgentServer ADD FactoryType int default(0) not null EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'转发版本 type:radio enum:{内部版本=0,开放版本=1} default:0 tooltip:标识当前转发版本 ' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Pub_AgentServer', @level2type=N'COLUMN', @level2name=N'FactoryType' End