adding a column description

后端 未结 4 683
滥情空心
滥情空心 2020-12-13 06:15

Does anyone know how to add a description to a SQL Server column by running a script? I know you can add a description when you create the column using SQL Server Management

4条回答
  •  春和景丽
    2020-12-13 06:25

    EXEC sys.sp_addextendedproperty @name = N'MS_Description', 
    @value = N'extended description', 
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Table_1',
    @level2type = N'COLUMN',
    @level2name = N'asdf'
    

    Create script on table [dbo].[Table_1]

提交回复
热议问题