Friday, 15 February 2013

SQL Server database details how many table and rows to be display DECLARE @TableRowCounts TABLE ([TableName] VARCHAR(128), [RowCount] INT) INSERT INTO @TableRowCounts ([TableName], [RowCount]) EXEC sp_MSforeachtable 'SELECT ''?'' [TableName], COUNT(*) [RowCount] FROM ?' SELECT [TableName], [RowCount] FROM @TableRowCounts ORDER BY [TableName]

No comments:

Post a Comment