sqlite中的表格第一列是时间,我想提取任意时间的数据和最新存储的数据,该怎么写呢?
如果你传给数据库的比较参数也是时间戳,那直接比较啊
select * from t where date>begindate and date<enddate
begindate ,enddate时间段开始与结束的时间戳
比如你比较参数是日期类型 则转换为时间戳比较
select * from t where date>strftime(’%s’,‘2021-01-04’)and date<strftime(’%s’,‘2021-05-04’)