[英]Count a select result number
I'm creating a interface to run a SQL query (C++ and QT), but i want to page and count the results. 我正在创建一个界面来运行SQL查询(C ++和QT),但是我想分页并计算结果。
Something like: 就像是:
select count (User select) as count and select (user select) limit 100;
Example: 例:
select count (select * from tbl_data where id >10);
Is there a way to do that or use the SQLITE3 library to do that? 有没有办法做到这一点或使用SQLITE3库做到这一点?
Regards. 问候。
I found a way 我找到了一个方法
select count(*) from (select tbl_name, sql FROM sqlite_master WHERE type='table') as data;
Thanks 谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.