"In the country of the blind, the one eyed man is the King"
Gautham Kasinath CV at : http://www.geocities.com/gkasinath
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Originally posted by Ravish Kumar:
To get the number of rows in a table without worrying abt any column name. (to execute fast)
Originally posted by Michael Matola:
select count(*) from ...
"In the country of the blind, the one eyed man is the King"
Gautham Kasinath CV at : http://www.geocities.com/gkasinath
Originally posted by gautham kasinath:
Well thats exactky what I m wondering.
Finding if the connection is still alive does seem a good possibility though.. but I would rather do a isAlive() on the connection object than execute a query.. wudnt you??
Regds
Lupo
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Originally posted by swaroop shastri:
how bout !isClosed() ?
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
"In the country of the blind, the one eyed man is the King"
Gautham Kasinath CV at : http://www.geocities.com/gkasinath
"In the country of the blind, the one eyed man is the King"
Gautham Kasinath CV at : http://www.geocities.com/gkasinath
"In the country of the blind, the one eyed man is the King"
Gautham Kasinath CV at : http://www.geocities.com/gkasinath
Originally posted by Michael Zalewski:
The database must scan the table. The database can stop looking and return a '1' as soon as it finds 'SOMETHING'.
The database must scan the whole table. It cannot stop after it finds the first match, because it must do more work to count all the matching rows.
If no match exists, both forms will scan the entire table. But the first query will return zero rows. (ResultSet.next() returns false). The second query will return a single row with the number '0'.
[ June 11, 2002: Message edited by: Michael Zalewski ]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |