How do I preform a query that returns the number of rows that meet a condition?
I assume its something like:
but i realize this is very wrong. help please?
thanks
Johann Dobbins wrote:
How do I preform a query that returns the number of rows that meet a condition?
I assume its something like:
but i realize this is very wrong. help please?
thanks
to clarify, i don't want to simply do:
because the select query has a few join fetches and would be quite expensive if there are more than a certain number of records. so, i would like to first count the number of records and only populate a result set if the number is small enough.
thank you