sql::Connection *con;
sql::Statement *stmt;
sql::ResultSet *res;
// ...
stmt = con->createStatement();
// ...
res = stmt->executeQuery("SELECT id, label FROM test ORDER BY id ASC");
while (res->next()) {
cout << ", id= '" << res->getString("id") << "'" << endl;
}
delete res;
delete stmt;
delete con;
在上面的代码中,我想检查id是否具有任何NULL值?