INDEXPROPERTY#
Returns the named index or statistics property value of a specified table identification number, index or statistics name, and property name. Returns NULL for XML indexes.
Syntax#
INDEXPROPERTY ( object_ID, 'index_or_statistics_name', 'property' )
Arguments#
object_id
Is an expression that contains the object identification number of the table or indexed view for which to provide index property information. object_id is int.
‘index_or_statistics_name’
Is an expression that contains the name of the index or statistics for which to return property information. index_or_statistics_name is nvarchar(128).
‘property’
Is an expression that contains the name of the database property to return. property is varchar(128), and can be one of these values.
Return types#
int
Example#
SELECT INDEXPROPERTY(
OBJECT_ID('HumanResources.Employee')
, 'PK_Employee_BusinessEntityID','IsClustered') AS [Is Clustered]
;