Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to count the total number of rows available in a table of sql server 2005 database programmatically by using C# in windows application.
Posted
Updated 17-May-13 20:18pm
v2
Comments
Basmeh Awad 18-May-13 2:35am    
you need query to count from SqlServer or complete C# code????
Hemant Singh Rautela 18-May-13 2:43am    
And what is the problem...???

IN sql there is query for count, and in c#.net there is function for this...

read tutorial for both....

1 solution

Select count (colname) from tablename
 
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