In SQL server 2000, microsoft added extended attributes to help you define and operate user-defined attributes on multiple database objects. You can use these user-defined attributes to add metadata to your database. You can use system stored procedures
Sp_addextendedproperty
Sp_updateextendedproperty
Sp_dropextendedproperty
To manage these attributes. In addition, you can use system functions
Fn_listextendedproperty ()
Search for existing property values. Microsoft uses extended attributes to write and manage description values, which are associated with columns in the SQL server Enterprise Manager table design view.
Use the system stored procedure sp_addetendedproperty to add the extended attributes of a column in a table
For example:
The following example adds an attribute ('caption, ''employee id') to the "ID" column of table "T1.
CREATE table T1 (id int, name char (20 ))
GO
EXEC sp_addextendedproperty 'caption ', 'employee id', 'user', dbo, 'table', T1, 'column', ID
List all extended attributes of the current database
Select * from: fn_listextendedproperty (NULL, NULL)
Original post address: http://www.cnblogs.com/kid-li/archive/2005/12/31/308684.html