T-SQL Tutorial

T-SQL sp_autostats


On Transact SQL language the sp_autostats is part of Database Engine Stored Procedures.
Display the status of all statistics on a table.
Enable AUTO_UPDATE_STATISTICS for all statistics on a table or index.
Disable AUTO_UPDATE_STATISTICS for a specific table or index.

sp_autostats syntax:

sp_autostats [ @tblname = ] 'table_or_indexed_view_name'
[ , [ @flagc = ] 'stats_value' ]
[ , [ @indname = ] 'statistics_name' ]





sp_autostats example:

USE model;
GO
EXEC sp_autostats 'Customers';
GO