Click here to Skip to main content
15,917,455 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
foreach (Table myTable in myAdventureWorks.Tables)
{

int count = //logic for getting total number of records.

//Print number of records for every table. 
}

There are total 5 tables in myAdventureWorks database. I want to get number of records present in each table and want 

to store number of records in integer datatype. 


What I have tried:

I want to solve this problem using SQL server SMO approach.
Posted
Updated 21-Dec-17 6:49am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900