Home Forums SQL Server 7,2000 Administration Use sp_MSforeachtable to gen COUNT(*) for each table in MyDBname RE: Use sp_MSforeachtable to gen COUNT(*) for each table in MyDBname
Kelley Fitz
SSC Enthusiast
Points: 134
More actions
April 30, 2014 at 1:46 pm
#1710004
as ? is your tablename you can use
sp_MSforeachtable 'SELECT COUNT(*) AS [?] FROM ?'