Last active
July 2, 2020 02:37
-
-
Save 499978920/92a95f846824005b4d4116456ad9cde9 to your computer and use it in GitHub Desktop.
[添加数据库字段属性]数据库字段属性说明修改 #db
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ALTER TABLE MD_CustomerGroupSheet ADD IsPushed BIT | |
if exists(select 1 from sys.extended_properties p where | |
p.major_id = object_id('MD_CustomerGroupSheet') | |
and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and c.name = 'IsPushed') | |
) | |
begin | |
execute sp_dropextendedproperty 'MS_Description', | |
'user', 'dbo', 'table', 'MD_CustomerGroupSheet', 'column', 'IsPushed' | |
end | |
execute sp_addextendedproperty 'MS_Description', | |
'是否推送', | |
'user', 'dbo', 'table', 'MD_CustomerGroupSheet', 'column', 'IsPushed' | |
go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment