SQLite 按日期排序1530019888000
我的 SQLite 数据库中的每条记录都包含一个字段,该字段包含一个以 'yyyy- 格式存储为 .string 的 DateMM-dd HH:mm:ss'
Every record in my SQLite database contains a field which contains a Date stored as a string in the format 'yyyy-MM-dd HH:mm:ss'.
是否可以查询数据库以获取包含最近日期的记录?
Is it possible to query the database to get the record which contains the most recent date please?
推荐答案
你可以这样做
SELECT * FROM Table ORDER BY date(dateColumn) DESC Limit 1
相关文章