in following code i want to retreive the maximum serial number from Serial column and return it to caller .
String query;
query = "select MAX(Serial) from CMS..CMSLog";
Statement st = con.createStatement();
ResultSet rs = st.executeQuery(query);
while (rs.next())
{
logserial = rs.getInt("1");
}
rs.close();
con.close();
but i found following exception
java.sql.SQLException: Column not found
so plz help. what to do?