Hello, I was wondering if anyone knows the answer to the following question: I can use last on my resultset to get the number of rows the query returned, I can call setMaxRows on my PreparedStatement to limit the number of rows returned. Is there any way to get the number of rows a database would have returned if max rows was not set? I have noticed our database - DB2 to be exact - has done alot of optimization on queries performed - and was hoping that during the compilation of a PreparedStatement it might have some meta data to access - or am i in LA-LA land with this one?
ok, gotcha - thank you for that. I was asking if the PreparedStatement i am creating has a max rows (which i set programmaticly - with the setMaxRows(int) method of PreparedStatement) of say 15 - and the results would tend to be in the 100's. What i am asking is if there is a way to determine how many the query WOULD HAVE HAD brought back if not programmaticly set to the 15? Sounds like magic to me.