Skip to content

Instantly share code, notes, and snippets.

@499978920
Last active July 2, 2020 02:37
Show Gist options
  • Save 499978920/92a95f846824005b4d4116456ad9cde9 to your computer and use it in GitHub Desktop.
Save 499978920/92a95f846824005b4d4116456ad9cde9 to your computer and use it in GitHub Desktop.
[添加数据库字段属性]数据库字段属性说明修改 #db
-- 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