如何使用SOCI和C 检查表中有多少行
How to check how many rows is in table using SOCI and C++?
简单问题。我有一个餐桌的人。我有两行:
1 Joe Doe joe.doe@ymail.com
2 Vivien Doe v.doe@gmail.com
如何撰写Soci语句,这会告诉我(返回)我桌上有多少行?(在我的示例中,我有2行)。
以获取SQL表中的行数使用count(*)
函数这样:
select count(*) from Person
更具体 - 将数字输入C 变量使用:
int count;
sql << "select count(*) from person", into(count);
相关文章:
- 如何检查一个c++字符串中有多少相同的字符/数字
- 链表c++插入,所有情况都已检查,但没有任何工作
- 检查注册表项是否链接到(或副本)另一个注册表项
- C++ 检查结果数组中有多少次数字
- 字符串变成链表,然后检查括号余额
- 使用 valgrind 检查我的链表暗示中的内存泄漏,让我"肯定丢失:1 个块中有 40 个字节"
- C++中带有编译时检查的链表
- 如何正确检查 c++ 是否存在注册表项?
- 如何检查单向链表的每个 3 个元素,然后删除其中一些元素?
- 家庭作业帮助 - 检查表单按钮上的数据
- 给定一个创建的带有货物的链表,我需要使用函数检查实际序列或"train"是否有效
- 如何在用于删除节点的函数中检查我的链表是否C++为空
- 在规范化 3d 向量时,在调用 sqrt 之前检查可以节省多少
- 如何检查链表中的数据是否存在C++
- 我如何检查一次测试中有多少个``期望_*`呼叫失败
- Google单元测试以检查表打印
- 如何在编译时间检查查找表的大小正确
- 如何使用SOCI和C 检查表中有多少行
- 未定义行为:代码审查的检查表
- 当检查表是否存在时,Sqlite3错误:no such table