Getting row count from stored procedure
Posted on 2006-04-19
How can I return the row count from a stored procedure? This seems like a very simple thing, as the result set should know how many rows it contains, but I can't figure it out.
Basically, I have a lengthy parameterized stored procedure and I'd like to know the row count (possibly with an output parameter) without having to run a Count(*) query or looping through the record set with a counter.
Thanks in advance.