获取 刚才插入行的 id

jdbc:    
    pmGetPrizeID = orcDbConn.prepareStatement("select SEQ_GET_PRIZE_ID.currval as id from dual");
    msGetPrizeId = pmGetPrizeID.executeQuery();

JFinal:
                        Record getPrize = new Record();
                        getPrize.set("TYPE", Constants.GET_PRIZE_TYPE_0);
                        boolean getPrizeSFlg = Db.save("GET_PRIZE", getPrize);
                        if (getPrizeSFlg == false) {                      
                            return false;
                        }
                        BigDecimal getPrizeId = getPrize.getBigDecimal("ID");

你可能感兴趣的:(获取 刚才插入行的 id)