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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 How to add column discription

Author  Topic 

nieurig
Starting Member

8 Posts

Posted - 2005-06-01 : 04:13:02
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 Northwind
EXEC sp_addextendedproperty 'MS_Description', 'This is the description', 'user', dbo, 'table', Orders, 'column', OrderID


Andy

Beauty is in the eyes of the beerholder
Go to Top of Page

nieurig
Starting Member

8 Posts

Posted - 2005-06-01 : 05:38:38
GREAT :-)

Thank you for pointing me to this solution.

Niels
Go to Top of Page
   

- Advertisement -