gpt4 book ai didi

java - 如何获取cachedrowset特定列的原始值?

转载 作者:行者123 更新时间:2023-12-02 04:09:45 25 4
gpt4 key购买 nike

它返回选择列的当前值,我需要的只是返回原始值以检查该值是否确实发生了变化。

while(rs.next()){
if (rs.rowUpdated){
String strOrigVal = "";
rs.getOriginalRow();
strOrigVal = rs.getString("col1");
}
}

最佳答案

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");
}
}
}

关于java - 如何获取cachedrowset特定列的原始值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33907698/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com