PowerShell and SQL – Easy and Different Ways to Find Number of Rows of all Tables in a database
SQL Example:
DECLARE @TableRowsCount table
(
Tablename varchar(50),
cnt int)
insert into @TableRowsCount
EXEC sp_MSforeachtable @command1=” select ‘?’,count(*) from ?”
select * from @TableRowsCount
PowerShell Example:
Load SQL PowerShell by...
2013-04-11
1,148 reads