This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
does there exist a java function I can call that will return the number of rows returned from a sql select query, so i don't have to "select count(*)"? ...i guess i'm looking for something like the " mysql_num_rows" function in PHP.
The basic problem is that the database itself doesn't know how many rows will be returned without executing the query, or at least a good part of the query.
You can get some an *estimate* of how may rows will be returned, since the optimizer computes that as part of its work to pick the best query plan. It's just a guess, though. For comparison, sometimes google searches will say "1-10 out of about 25,000 for..." but when you get to page 5 it says "50-60 out of 1267 for ...." What happened to the other 24,000 results? They never existed -- google's initial estimate was off.