Wpis z mikrobloga

int serial=0;
Statement st = null;
ResultSet rs = null;
Connection connection = null;
String query="SELECT rcp.rcposobaosobaidseq.nextval from rcp.rcposobaosobaidseq";
try
{

connection = DriverManager.getConnection("jdbc:postgresql://localhost:12345/dcw","test", "test");

st=connection.createStatement();
rs=st.executeQuery(query);
serial=rs.getInt(1);

setOsobaId(serial);
connection.close();
}
catch (SQLException sqle)
{
throw new DAOException(sqle);
}
Czy takie cos powinno zwrocic mi ostatnia wartosc klucza? #programowanie
  • 3