sys.extended_properties (Transact-SQL)
SQL Server 2012
This topic has not been rated- Rate this topic
Return one row for each extended attribute in the current database.
Column name |
type of data |
Explanation |
---|---|---|
class |
tinyint |
Identifies the item class on which the attribute exists. Can be one of the following values: 0 = database 1 = object or column 2 = parameter 3 = Architecture 4 = database body 5 = Assembly 6 = type 7 = Index 10 = XML schema collection 15 = message type 16 = Service agreement 17 = Service 18 = Remote service binding 19 = routing 20 = data space (file group or partition scheme) 21 = Partition function 22 = database file 27 = Planning Guide |
class_desc |
nvarchar(60) |
The description of the class on which the extended attribute exists. Can be one of the following values: DATABASE OBJECT_OR_COLUMN PARAMETER SCHEMA DATABASE_PRINCIPAL ASSEMBLY TYPE INDEX XML_SCHEMA_COLLECTION MESSAGE_TYPE SERVICE_CONTRACT SERVICE REMOTE_SERVICE_BINDING ROUTE DATASPACE PARTITION_FUNCTION DATABASE_FILE PLAN_GUIDE |
major_id |
int |
The ID of the item on which the extended attribute exists is explained according to the item class. For most items, this ID applies to the item represented by the class. The following is an explanation of the non-standard master ID: If class is 0, major_id is always 0. If class is 1, 2, or 7, major_id is object_id. |
minor_id |
int |
The auxiliary ID of the item on which the extended attribute exists is explained according to the item class. For most items, the ID is 0; otherwise, the ID is one of the following values: If class = 1, minor_id is equal to column_id if the item is a column, and equal to 0 if the item is an object. 如果 class = 2,则 minor_id 为 parameter_id。 如果 class = 7,则 minor_id 为 index_id。 |
name |
sysname |
属性名,其 class、major_id 和 minor_id 是唯一的。 |
value |
sql_variant |
扩展属性的值。 |
站在巨人的肩膀,去学习