Execute the Transact-SQL script in the query pane.
In the result pane, click the ExecutionPlan tab.
Right-click the icon of the physical operator that suggests that statistics need to be updated, and then click Manage Statistics.... The database and table that the Graphical Execution Plan suggests need updated statistics are automatically selected.
Optionally, in Database and Table, click the name of a different database and table on which to update the statistics.
Click Update....
In Name, select the statistics to be updated.
Optionally, in Amountofdatatosample, select:
Default to let Microsoft® SQL Server™ determine the number of rows to sample automatically.
Sample all the data to instruct SQL Server to sample all of the data in the table.
Sample % of the data and enter a percentage of data to sample to base the statistics on.
Samplerows and enter the number of rows to sample to base the statistics on.
Optionally, in Updatestatisticsoptions, select:
Includecolumns to update statistics on columns as well as indexes.
Do not automatically recompute statistics (not recommended) to prevent SQL Server from updating statistics automatically as the data is updated.
Optionally, click Edit SQL... to view and edit the Transact-SQL statement used to create or update the statistics.