jdbc读取新插入Oracle数据库Sequence值的5种方法
作者:互联网
jdbc读取新插入Oracle数据库Sequence值的5种方法
http://www.360doc.com/content/11/1102/17/1290342_161130566.shtml
自己测试的代码:
OraclePreparedStatement ops = (OraclePreparedStatement) conn.prepareStatement(sql); ops.setString(1, "asdf"); ops.registerReturnParameter(2, OracleTypes.INTEGER); ops.executeUpdate(); ResultSet resultSet = ops.getReturnResultSet(); while(resultSet.next()){ int int1 = resultSet.getInt(1); System.out.println(int1); }
标签:jdbc,ops,Sequence,resultSet,int1,Oracle 来源: https://blog.51cto.com/u_15241951/2852447