I want to get the value that I find using the COUNT SQL command. Usually I enter the column name that I want to get in the getInt () method getString (), what should I do in this case when there is no specific column name.
I used "AS" in the same way as for the table alias, I'm not sure if this will work, I would not have thought.
Statement stmt3 = con.createStatement(); ResultSet rs3 = stmt3.executeQuery("SELECT COUNT(*) FROM "+lastTempTable+") AS count"); while(rs3.next()){ count = rs3.getInt("count"); }
java sql count jdbc
Ankur May 04 '10 at 7:53 a.m. 2010-05-04 07:53
source share