SQLite按日期排序1530019888000 [英] SQLite Order By Date1530019888000
本文介绍了SQLite按日期排序1530019888000的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的SQLite
数据库中的每个记录都包含一个字段,该字段包含以'yyyy-MM-dd HH:mm:ss'
格式存储为string
的Date
.
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
这篇关于SQLite按日期排序1530019888000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文