我正在使用 c++11 和 pqxx 访问 postgresql 数据库,如果成功与否,我需要插入行的 id 和标志。执行 INSERT 到数据库获取插入行的 id 后如何获取?我试图在网上找到例子但没有成功。
work txn(*conn);
txn.prepared("insert ")(person_name).exec();
txn.commit();
我正在使用 c++11 和 pqxx 访问 postgresql 数据库,如果成功与否,我需要插入行的 id 和标志。执行 INSERT 到数据库获取插入行的 id 后如何获取?我试图在网上找到例子但没有成功。
work txn(*conn);
txn.prepared("insert ")(person_name).exec();
txn.commit();