Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hi folks,i convert a database from Access to SQL-Server by generating the CREATE-Statements for the given structure.The structure itself was copied, but i found no way to generate discriptions for the columns. At the enterprise manager i found a possibility to set this text, but i need to do this work from SQL.Is there a way to set a discription by using CREATE TABLE or ALTER TABLE?by which syntax? Thanks for your help.Niels
AndyB13
Aged Yak Warrior
583 Posts
Posted - 2005-06-01 : 05:13:04
You can use sp_addextendedproperty
USE NorthwindEXEC sp_addextendedproperty 'MS_Description', 'This is the description', 'user', dbo, 'table', Orders, 'column', OrderID
AndyBeauty is in the eyes of the beerholder
nieurig
Starting Member
8 Posts
Posted - 2005-06-01 : 05:38:38
GREAT :-)Thank you for pointing me to this solution.Niels