SQL 2005: Add table and column description

— SQL Server 2005

— add table descriptions
EXEC sp_addextendedproperty
@name = N’Caption’, @value = ‘my table description’,
@level0type = N’Schema’, @level0name = dbo,
@level1type = N’Table’, @level1name = the_table;

— add column descriptions
EXEC sp_addextendedproperty
@name = N’Caption’, @value = ‘the column description’,
@level0type = N’Schema’, @level0name = dbo,
@level1type = N’Table’, @level1name = the_table,
@level2type = N’Column’, @level2name = the_column;

— add procedure descriptions
EXEC sp_addextendedproperty
@name = N’Caption’, @value = ‘my proc description’,
@level0type = N’Schema’, @level0name = dbo,
@level1type = N’Procedure’, @level1name = the_procedure;


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s