sys.stats_columns (Transact-SQL)sys.stats_columns (Transact-SQL)

適用於: 是SQL Server 是Azure SQL Database 是Azure Synapse Analytics (SQL DW) 是平行處理資料倉儲 APPLIES TO: yesSQL Server yesAzure SQL Database yesAzure Synapse Analytics (SQL DW) yesParallel Data Warehouse

包含屬於的每個資料行的資料列sys.stats統計資料。Contains a row for each column that is part of sys.stats statistics.

資料行名稱Column name 資料類型Data type 描述Description
object_idobject_id intint 這個資料行所屬的物件識別碼。ID of the object of which this column is part.
stats_idstats_id intint 這個資料行所屬的統計資料識別碼。ID of the statistics of which this column is part.

如果統計資料對應到索引, stats_id值是相同index_id中的值sys.indexes目錄檢視。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_idstats_column_id intint 在統計資料行集當中,以 1 為基底的序數。1-based ordinal within set of stats columns.
column_idcolumn_id intint 從資料行的識別碼sys.columnsID of the column from sys.columns.

PermissionsPermissions

目錄檢視內中繼資料的可見性會限制在使用者所擁有的安全性實體,或已授與使用者某些權限的安全性實體。The visibility of the metadata in catalog views is limited to securables that a user either owns or on which the user has been granted some permission. 如需相關資訊,請參閱 Metadata Visibility ConfigurationFor more information, see Metadata Visibility Configuration.

另請參閱See Also

物件目錄檢視 (Transact-SQL) Object Catalog Views (Transact-SQL)
目錄檢視 (Transact-SQL) Catalog Views (Transact-SQL)
查詢 SQL Server 系統目錄常見問題集Querying the SQL Server System Catalog FAQ
統計資料 Statistics
sys.dm_db_stats_properties (Transact-SQL) sys.dm_db_stats_properties (Transact-SQL)
sys.dm_db_stats_histogram (-SQL)) sys.dm_db_stats_histogram (Transact-SQL)
sys.stats (Transact SQL)sys.stats (Transact-SQL)