我有以下代码:
string query = select COUNT(*) from TRACKER where TYPE = ? and LAST_MODIFIED_TIME > LAST_RETREIVED_TIME;
prepStmt = connection.prepareStatement(query);
prepStmt.setString(1, "xml");
resultset = prepStmt.executeQuery();
resultset.next();
int rowcount = resultset.getInt("COUNT(*)");
在数据库中,我有 1 行用于上述查询,但在代码中我得到 rowcount= 0。有什么帮助吗?