Get size of max possible result set

Posted by wheresrhys on Stack Overflow See other posts from Stack Overflow or by wheresrhys
Published on 2010-05-09T17:58:28Z Indexed on 2010/05/09 18:08 UTC
Read the original article Hit count: 257

Filed under:
|

For my application most of my SQL queries return a specified number of rows. I'd also like to get the maximum possible number of results i.e. how many rows would be returned if I wasn't setting a LIMIT.

Is there a more efficient way to do this (using just SQL?) than returning all the results, getting the size of the result set and then splicing the set to return just the first N rows.

© Stack Overflow or respective owner

Related posts about php

Related posts about sql