sqlite语句中返回的行数 [英] Number of rows returned in a sqlite statement

查看:198
本文介绍了sqlite语句中返回的行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何简单的方法来获取sqlite语句返回的行数?我不想先完成COUNT()的过程.谢谢.

Is there any easy way to get the number of rows returned by a sqlite statement? I don't want to have to go through the process of doing a COUNT() first. Thanks.

推荐答案

在每次调用sqlite_step时,将变量加1.

On each call to sqlite_step, increment a variable by 1.

如果您想提前 行计数,那么没有简单的方法.

If you want the row count in advance, then there's no easy way.

这篇关于sqlite语句中返回的行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆