hibernate 也用找id

Connection poolConn=session.connection();
     PreparedStatement  ptmta =  poolConn.prepareStatement("select SEQ_ACDM_TACHE_NUM.nextval from dual");
     ResultSet rs = ptmta.executeQuery();
     String id=null;
     if(rs.next()){
     rs.getString(1);
           id=rs.getString(1);
     }

你可能感兴趣的:(Hibernate)