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];
}