我需要根据Oracle NoSQL Table中的where子句获取记录计数。 与下面的RDBMS类似。
SELECT COUNT(*) AS COUNT FROM TABLE1 WHERE COLUMN1='FOO';
我正在使用的Java代码是:-
store=connector.getConnection();
StatementResult stmtResult = store.executeSync("SELECT COUNT(*) AS COUNT FROM TABLE1 WHERE COULMN1="+value);
for( RecordValue record : stmtResult ) {
result=String.valueOf(record.get("COUNT").asLong().get());
}
有人可以帮忙吗?