Skip to content

Latest commit

 

History

History
44 lines (40 loc) · 2.57 KB

sys-stats-columns-transact-sql.md

File metadata and controls

44 lines (40 loc) · 2.57 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
sys.stats_columns (Transact-SQL)
sys.stats_columns (Transact-SQL)
rwestMSFT
randolphwest
12/18/2017
sql
system-objects
reference
stats_columns_TSQL
stats_columns
sys.stats_columns
sys.stats_columns_TSQL
sys.stats_columns catalog view
TSQL
>=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-server-2016||>=sql-server-linux-2017||=azuresqldb-mi-current||=fabric

sys.stats_columns (Transact-SQL)

[!INCLUDE sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw]

Contains a row for each column that is part of sys.stats statistics.

Column name Data type Description
object_id int ID of the object of which this column is part.
stats_id int ID of the statistics of which this column is part.

If statistics correspond to an index, the stats_id value is the same as the index_id value in the sys.indexes catalog view.
stats_column_id int 1-based ordinal within set of stats columns.
column_id int ID of the column from sys.columns.

Permissions

[!INCLUDEssCatViewPerm] For more information, see Metadata Visibility Configuration.

See Also

Object Catalog Views (Transact-SQL)
Catalog Views (Transact-SQL)
Querying the SQL Server System Catalog FAQ
Statistics
sys.dm_db_stats_properties (Transact-SQL)
sys.dm_db_stats_histogram (Transact-SQL)
sys.stats (Transact-SQL)
Statistics in Microsoft Fabric