This is a discussion on Fast counting of records within the SQL Server forums, part of the Microsoft SQL Server category; --> I seem to remember reading many moons ago about a function where you can retrieve a count of the ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I seem to remember reading many moons ago about a function where you can retrieve a count of the last recordset you opened. For example: I've got a stored procedure that returns a recordset using the TOP 10 so I only get the top 10 records. I need to know the recordcount but I dont want to reuse the SELECT statement because its quite complex. Any ideas? What does @@Count do? Thanks in advance |
| ||||
| "Samuel Hon" <noreply@samuelhon.co.uk> wrote in message news:c8672b7d.0309110815.2fba8c32@posting.google.c om... > I seem to remember reading many moons ago about a function where you > can retrieve a count of the last recordset you opened. > > For example: > > I've got a stored procedure that returns a recordset using the TOP 10 > so I only get the top 10 records. I need to know the recordcount but I > dont want to reuse the SELECT statement because its quite complex. > > Any ideas? > > What does @@Count do? > > Thanks in advance @@ROWCOUNT Simon |