Hmm, I do not know of any function that does that.
Supposed you have this query: select id, name from mytable:
Code:
set rowcount 200
select id, name from mytable
set rowcount 0
will give 200 records (limit)
Code:
set rowcount 200
select id, name from mytable
select @@rowcount)
set rowcount 0
will give 200 records, plus the number 200, for the 200 records returned.
If you want to know how many records would have returned without the set rowcount-command, you could use this one:
Code:
select count(id) from mytable
This one only returnes the number of rows of that query. It is calculated on the server, so it should save you some time (the time it would take to send the resultset and display it on your client).