MSSQLCity.Com - All about MS SQL
     
About Us  
SSWUG Articles  
Articles  
FAQ  
Administration  
Backup/Restore  
Connectivity  
Development  
General  
Installation  
OLAP  
Replication  
Transfer/move  
Trouble  
SQL 6.5  
Scripts  
Tips  
Test Exams  
Advertise  
Download  
History  
Search  
Traffic  
Related Links  
     
Your button logo
Add to Favorites
 
     
 


I specified the column's description by using the SQL Server 2000 Enterprise Manager. How can I get this description from my stored procedure?

Answer:

The text you entered in the description edit box is implemented as a SQL Server 2000 extended property. To get its value you should use the system function fn_listextendedproperty.
See the fn_listextendedproperty function in SQL Server 2000 Books Online.
This is the example to get all extended properties for all columns in table1 table:

SELECT * FROM ::fn_listextendedproperty (null, 'user', 'dbo', 'table',
                                         'table1', 'column', default)
Check the 'value' column in the result set to get the column's description.


 

 
Visit The SQL Server Worldwide User's Group for all the latest news and information about SQL Server, Oracle, DB2 and XML for developers and administrators.

(c) 1997, 2005 Bits on the Wire, Inc