T-SQL Tutorial

T-SQL sp_statistics


On Transact SQL language the sp_statistics is part of Database Engine Stored Procedures.
Returns a list of all indexes and statistics on a specified table or indexed view.

sp_statistics syntax:

sp_statistics [ @table_name = ] 'table_name'
[ , [ @table_owner = ] 'owner' ]
[ , [ @table_qualifier = ] 'qualifier' ]
[ , [ @index_name = ] 'index_name' ]
[ , [ @is_unique = ] 'is_unique' ]
[ , [ @accuracy = ] 'accuracy' ]





sp_statistics example:

USE model;
GO
EXEC sp_statistics @table_name = 'Customers';
GO


USE model;
GO
EXEC sp_statistics 'Customers';
GO