Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我怎样才能得到查询执行的结果 - select count (*) from myTable?代码是:
select count (*) from myTable
... oc::Statement* stmt = m_cConnection->createStatement(select count (*) from myTable); oc::ResultSet* res = stmt->executeQuery(); ...
如何获得行数的值res?
res
写吧
cout << res->getString(1) << endl;
或者
cout << "\t... MySQL counts: " << res->getInt(1) << endl;