开发者

How to limit date?

开发者 https://www.devze.com 2022-12-31 00:04 出处:网络
I\'d like to select all entries from a table where date is the last one and only those ones. For example: today is May 16th, the last entries I have from my table is dated from May 15th, but I have o

I'd like to select all entries from a table where date is the last one and only those ones.

For example: today is May 16th, the last entries I have from my table is dated from May 15th, but I have older ones (May 14th, May13th, etc). I'd like to select only the dated from May 15th, but it's not this specific date, I need to select every entry dated from the last date I have in my database.

开发者_如何学PythonHow to?

Thx in advance


SELECT [list]
FROM MyTable MT1
WHERE MT1.date = (
     SELECT MAX(MT2.date)
     FROM MyTable MT2
  )
0

精彩评论

暂无评论...
验证码 换一张
取 消