T-SQL Tutorial

T-SQL sp_updatestats


On Transact SQL language the sp_updatestats is part of Database Engine Stored Procedures and runs update statistics against all tables in the current database.

sp_updatestats syntax:

sp_updatestats [ @resample = 'resample'] ;





sp_updatestats example 1:

USE model;
GO
EXEC sp_updatestats;
GO

sp_updatestats example 2:

USE model;
GO
EXEC sp_updatestats @resample = 'resample';
GO