What is the quickest way to get the count of rows in a table into an int
variable?
for example how would I make this happen?
int remaining = SELECT Count(*) FROM states.dbo.cities
Smithers - 25 Aug 2007 04:55 GMT
ADO.NET's .ExecuteScalar() method is designed for returning a single value.
-HTH
> What is the quickest way to get the count of rows in a table into an int
> variable?
>
> for example how would I make this happen?
>
> int remaining = SELECT Count(*) FROM states.dbo.cities