if (not exists (select name from syscolumns where id = object_id('Pub_ClassInfo') and name = 'UserGuid')) Begin ALTER TABLE Pub_ClassInfo ADD UserGuid nvarchar(64) default('') not null EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户 type:selectbox fk_table:Pub_User fk_key:Guid fk_name:Name required:true required_msg:请选择所属用户 required_default:null' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Pub_ClassInfo', @level2type=N'COLUMN', @level2name=N'UserGuid' End