INDEXPROPERTY()
Returns the named property value of a specified table identification number, index or statistics name, and property name.
Signature
INDEXPROPERTY ( object_ID , index_or_statistics_name , property )Parameters
- object_ID — 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 — 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 — An expression that contains the name of the index or statistics property to return. *property* is varchar(128), and can be one of these values.
Examples
SELECT
INDEXPROPERTY(OBJECT_ID('HumanResources.Employee'), 'PK_Employee_BusinessEntityID', 'IsClustered') AS [Is Clustered],
INDEXPROPERTY(OBJECT_ID('HumanResources.Employee'), 'PK_Employee_BusinessEntityID', 'IndexDepth') AS [Index Depth],
INDEXPROPERTY(OBJECT_ID('HumanResources.Employee'), 'PK_Employee_BusinessEntityID', 'IndexFillFactor') AS [Fill Factor];NULL|NULL|NULLRun against SQL Server 16.0.4265.3 on 2026-09-13. This is the output we got, not the documentation’s.
Available on
- SQL Server 2017 and later
- Azure SQL Database
- Azure SQL Managed Instance
- Azure Synapse Analytics
- Analytics Platform System (PDW)
- Fabric SQL database
Signature and description adapted from the Microsoft SQL documentation, used under the CC BY 4.0. SQL Server and Azure are trademarks of the Microsoft group of companies. This page is not affiliated with Microsoft.