它返回select列的当前值,我只需要返回原始值以检查值是否真的发生了变化。
while(rs.next()){
if (rs.rowUpdated){
String strOrigVal = "";
rs.getOriginalRow();
strOrigVal = rs.getString("col1");
}
}
答案 0 :(得分:2)
ResultSet getOriginalRow() throws SQLException
while(rs.next()){
if (rs.rowUpdated){
String strOrigVal = "";
ResultSet ors = rs.getOriginalRow(); //you should catch the return value
if(ors.next()){ //move to the first cursor
strOrigVal = ors.getString("col1");
}
}
}