Click here to Skip to main content
14,878,176 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.
Updated 17-May-13 20:18pm
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 there is function for this...

read tutorial for both....

1 solution

Select count (colname) from tablename

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