Possible Duplicate:
SQL Comments on Create Table on SQL Server 2008
I just want to know how to add a comment to an existing table column in SQL Server? Seems simple, but I just don't find anything in the 5 first results that throw my search engine.
edits
Rather than using the UI, I would to know the SQL query.
Multi-line comments start with /* and end with */ . Any text between /* and */ will be ignored.
While creating a new table in SQL Server Management Studio, see this screenshot for adding a description to a column:
To do it programmatically:
EXEC sp_updateextendedproperty @name = N'MS_Description', @value = 'Your description', @level0type = N'Schema', @level0name = dbo, @level1type = N'Table', @level1name = Your Table Name, @level2type = N'Column', @level2name = Yuur Column Name;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With