I'm fairly new to JDBC and am trying to figure out if it's possible to use the results of sum(xxxx) in a ResultSet. I'm querying for "select sum(xxx) where xxx.....". But I can't figure out what to use to get the value of sum(). Can anyone tell me if this is possible?
I think I had a fundamental misunderstanding of ResultSet that thought each ResultSet.getXXX() referred to the columns in actual database not in the ResultSet, though this goes against all logic:-).
I think that either of your solutions should do the trick.