Table.EnumLastStatisticsUpdates Method
Enumerates a list of information about the most recent statistics updates.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
'Declaration
Public Function EnumLastStatisticsUpdates As DataTable
'Usage
Dim instance As Table
Dim returnValue As DataTable
returnValue = instance.EnumLastStatisticsUpdates()
public DataTable EnumLastStatisticsUpdates()
public:
DataTable^ EnumLastStatisticsUpdates()
member EnumLastStatisticsUpdates : unit -> DataTable
public function EnumLastStatisticsUpdates() : DataTable
Return Value
Type: System.Data.DataTable
A DataTable system object value that contains a list of information about the most recent statistics updates.
Examples
The following code example demonstrates how to enumerate statistic update information.
C#
Server srv = new Server("(local)");
Database db = srv.Databases["AdventureWorks2008R2"];
lastStatisticsUpdates[];
Table tb1 = db.Tables[0];
Table tb2 = db.Tables[1];
DataTable[] lastSUpdates = new DataTable[2] {tb1.EnumLastStatisticsUpdates(), tb2.EnumLastStatisticsUpdates()}
Powershell
$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$db = New-Object Microsoft.SqlServer.Management.Smo.Database
$db = $srv.Databases.Item("AdventureWorks2008R2")
$tb1 = $db.Tables[0]
$tb2 = $db.Tables[1]
$lastSUpdates = @($tb1.EnumLastStatisticsUpdates(), $tb2.EnumLastStatisticsUpdates());