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
 SQL Server Administration (2000)
 How to retrieve the description of a column?

Author  Topic 

renlaps
Starting Member

2 Posts

Posted - 2005-07-04 : 23:20:52
Hey guys!

Is there a way to retrieve the description of a column using the t-sql command? The description/comment/remark in a particular column that we put (usually we do this in the enterprise manager).

Or the exact formula or function in a particular column?

T&R
Renlaps

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-07-05 : 01:03:10
There are two methods

select value from sysproperties where id=object_id('tableName')

or

SELECT value FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table', 'tableName', 'column', default)




Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

renlaps
Starting Member

2 Posts

Posted - 2005-07-05 : 02:23:23
Thanks,

It works, this is very cool!

T&R,
Renlaps
Go to Top of Page
   

- Advertisement -