A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
maximum value of a column
Joined: Jan 13, 2009
Jun 08, 2009 06:01:35
I am trying to add rows to a table (name : csv) whose schema is
ID Name Place
-- ------ --------
res = stmt.executeQuery("select max(id) as id from csv");
int i = res.getInt("id");
i want to get the maximum value of ID . when i typed the above code, i get
. what shall i do.
Joined: Feb 18, 2008
Jun 08, 2009 06:29:36
ResultSet res = stmt.executeQuery("select max(id) as id from csv"); res.next(); int i = res.getInt("id"); i++;
you have to move the resultset to some specific location before doing get operation
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: maximum value of a column
object tag and csv file
read from csv: how to handle null?
iterate a doc with sax and change xpath expression at run time
text input onblur calls a js function for formatting of the input data
display tag issue
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013