我想检索 sqlite
数据库中最后 10 条记录的最大值
,我使用以下查询,但它检索了最大值
对于所有列
而不仅仅是最后10列,我该如何解决这个问题?
select ifnull(Max(Systolic),0) from PressureAndHR order by ID desc limit 10;
谢谢你,
最佳答案
尝试修改
select ifnull(Max(Systolic),0) from PressureAndHR order by ID desc limit 10;
至
SELECT ifnull(Max(Systolic),0) FROM (SELECT * PressureAndHR ORDER by ID DESC limit 10);
关于objective-c - 检索 objective-c 中最后 10 条记录的最大值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16080571/