Get the Total Number of Rows for Each Table in Your Database
Use the following query to get the total number of rows for each table in your database: CREATE TABLE #TempTable ( [Table Name] [varchar](max), [Total Records] int ); EXEC sp_MSForEachTable