How we can add Description to the Column using Sql Command?

 Posted by Lakhangarg on 10/27/2009 | Category: Sql Server Interview questions | Views: 4984

We can Add Description to Column using sp_addextendedproperty System Store Procedure.

Sample Command to Insert Description for Column in a Table:

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'My Description for Column Here' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'MyTableName',       @level2type=N'COLUMN',@level2name=N'ColumnName'

Thanks & Regards
Lakhan Pal Garg

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response