SQLite新手问题,怎样获取数据库里面有多少条数据

2024-11-08 00:33:36
有1个网友回答
网友(1):

例子:
FMResultSet *s = [db executeQuery:@"SELECT COUNT(*) FROM myTable"];
if ([s next]) {
int totalCount = [s intForColumnIndex:0];
}